[webkit-reviews] review granted: [Bug 105113] [WebKit2] Register schemes with the network process if it is being used : [Attachment 179627] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Dec 15 15:37:49 PST 2012
Anders Carlsson <andersca at apple.com> has granted Andy Estes
<aestes at apple.com>'s request for review:
Bug 105113: [WebKit2] Register schemes with the network process if it is being
used
https://bugs.webkit.org/show_bug.cgi?id=105113
Attachment 179627: Patch
https://bugs.webkit.org/attachment.cgi?id=179627&action=review
------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=179627&action=review
> Source/WebKit2/NetworkProcess/NetworkProcess.h:78
> + void registerSchemeForCustomProtocol(const WTF::String&);
> + void unregisterSchemeForCustomProtocol(const WTF::String&);
No need for WTF:: here.
> Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm:46
> + NSArray *schemes = [[WKBrowsingContextController customSchemes]
allObjects];
> + for (size_t i = 0; i < [schemes count]; ++i)
> + parameters.urlSchemesRegisteredForCustomProtocols.append([schemes
objectAtIndex:i]);
You can just use fast enumeration here:
for (NSString *scheme in [WKBrowsingContextController customSchemes])
> Source/WebKit2/UIProcess/WebContext.cpp:1116
> + if (m_usesNetworkProcess)
> +
NetworkProcessManager::shared().process()->send(Messages::NetworkProcess::Regis
terSchemeForCustomProtocol(scheme), 0);
> + else
> +
sendToAllProcesses(Messages::WebProcess::RegisterSchemeForCustomProtocol(scheme
));
> +}
This is missing the #if ENABLE(NETWORK_PROCESS). I'd use an early return to
avoid making the indentation look weird.
> Source/WebKit2/UIProcess/WebContext.cpp:1123
> + if (m_usesNetworkProcess)
> +
NetworkProcessManager::shared().process()->send(Messages::NetworkProcess::Unreg
isterSchemeForCustomProtocol(scheme), 0);
> + else
> +
sendToAllProcesses(Messages::WebProcess::UnregisterSchemeForCustomProtocol(sche
me));
Ditto.
> Source/WebKit2/UIProcess/WebContext.h:329
> + void registerSchemeForCustomProtocol(const WTF::String&);
> + void unregisterSchemeForCustomProtocol(const WTF::String&);
No need for WTF::
More information about the webkit-reviews
mailing list