RESOLVED FIXED 105113
[WebKit2] Register schemes with the network process if it is being used
https://bugs.webkit.org/show_bug.cgi?id=105113
Summary [WebKit2] Register schemes with the network process if it is being used
Andy Estes
Reported 2012-12-15 15:29:07 PST
[WebKit2] Register schemes with the network process if it is being used
Attachments
Patch (13.76 KB, patch)
2012-12-15 15:35 PST, Andy Estes
andersca: review+
buildbot: commit-queue-
Andy Estes
Comment 1 2012-12-15 15:35:51 PST
Anders Carlsson
Comment 2 2012-12-15 15:40:08 PST
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::
Build Bot
Comment 3 2012-12-15 15:43:48 PST
Andy Estes
Comment 4 2012-12-15 16:04:48 PST
Note You need to log in before you can comment on or make changes to this bug.