[WebKit2] Register schemes with the network process if it is being used
Created attachment 179627 [details] Patch
Comment on attachment 179627 [details] Patch 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::RegisterSchemeForCustomProtocol(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::UnregisterSchemeForCustomProtocol(scheme), 0); > + else > + sendToAllProcesses(Messages::WebProcess::UnregisterSchemeForCustomProtocol(scheme)); Ditto. > Source/WebKit2/UIProcess/WebContext.h:329 > + void registerSchemeForCustomProtocol(const WTF::String&); > + void unregisterSchemeForCustomProtocol(const WTF::String&); No need for WTF::
Comment on attachment 179627 [details] Patch Attachment 179627 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15360229
Committed r137818: <http://trac.webkit.org/changeset/137818>