<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[213441] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/213441">213441</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2017-03-05 18:53:31 -0800 (Sun, 05 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename CustomProtocolFoo to LegacyCustomProtocolFoo.
https://bugs.webkit.org/show_bug.cgi?id=169188
Reviewed by Andy Estes.
* CMakeLists.txt:
* DerivedSources.make:
* NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm.
(+[WKCustomProtocol canInitWithRequest:]):
(+[WKCustomProtocol canonicalRequestForRequest:]):
(+[WKCustomProtocol requestIsCacheEquivalent:toRequest:]):
(-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
(-[WKCustomProtocol initializationRunLoop]):
(-[WKCustomProtocol startLoading]):
(-[WKCustomProtocol stopLoading]):
(WebKit::LegacyCustomProtocolManager::registerProtocolClass):
(WebKit::LegacyCustomProtocolManager::registerScheme):
(WebKit::LegacyCustomProtocolManager::unregisterScheme):
(WebKit::LegacyCustomProtocolManager::supportsScheme):
(WebKit::dispatchOnInitializationRunLoop):
(WebKit::LegacyCustomProtocolManager::didFailWithError):
(WebKit::LegacyCustomProtocolManager::didLoadData):
(WebKit::LegacyCustomProtocolManager::didReceiveResponse):
(WebKit::LegacyCustomProtocolManager::didFinishLoading):
(WebKit::LegacyCustomProtocolManager::wasRedirectedToRequest):
(WebKit::LegacyCustomProtocolManager::protocolForID):
* NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.cpp.
(WebKit::generateCustomProtocolID):
(WebKit::LegacyCustomProtocolManager::supplementName):
(WebKit::LegacyCustomProtocolManager::LegacyCustomProtocolManager):
(WebKit::LegacyCustomProtocolManager::initialize):
(WebKit::LegacyCustomProtocolManager::addCustomProtocol):
(WebKit::LegacyCustomProtocolManager::removeCustomProtocol):
(WebKit::LegacyCustomProtocolManager::startLoading):
(WebKit::LegacyCustomProtocolManager::stopLoading):
* NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h.
* NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in.
* NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp.
(WebKit::CustomProtocolManager::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
(WebKit::CustomProtocolManager::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
(WebKit::CustomProtocolManager::registerProtocolClass):
(WebKit::CustomProtocolManager::registerScheme):
(WebKit::CustomProtocolManager::unregisterScheme):
(WebKit::CustomProtocolManager::supportsScheme):
(WebKit::CustomProtocolManager::didFailWithError):
(WebKit::CustomProtocolManager::didLoadData):
(WebKit::CustomProtocolManager::didReceiveResponse):
(WebKit::CustomProtocolManager::didFinishLoading):
(WebKit::CustomProtocolManager::wasRedirectedToRequest):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::create):
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::globalLegacyCustomProtocolManager):
(WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager):
(WebKit::NetworkSessionCocoa::create):
(WebKit::NetworkSessionCocoa::defaultSession):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::globalCustomProtocolManager): Deleted.
(WebKit::NetworkSessionCocoa::setCustomProtocolManager): Deleted.
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* UIProcess/API/APICustomProtocolManagerClient.h:
(API::LegacyCustomProtocolManagerClient::~LegacyCustomProtocolManagerClient):
(API::LegacyCustomProtocolManagerClient::startLoading):
(API::LegacyCustomProtocolManagerClient::stopLoading):
(API::LegacyCustomProtocolManagerClient::invalidate):
(API::CustomProtocolManagerClient::~CustomProtocolManagerClient): Deleted.
(API::CustomProtocolManagerClient::startLoading): Deleted.
(API::CustomProtocolManagerClient::stopLoading): Deleted.
(API::CustomProtocolManagerClient::invalidate): Deleted.
* UIProcess/Cocoa/LegacyCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.h.
* UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm: Renamed from Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.mm.
(-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
(-[WKCustomProtocolLoader dealloc]):
(-[WKCustomProtocolLoader customProtocolManagerProxyDestroyed]):
(-[WKCustomProtocolLoader connection:didFailWithError:]):
(-[WKCustomProtocolLoader connection:willCacheResponse:]):
(-[WKCustomProtocolLoader connection:didReceiveResponse:]):
(-[WKCustomProtocolLoader connection:didReceiveData:]):
(-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
(-[WKCustomProtocolLoader connectionDidFinishLoading:]):
(WebKit::LegacyCustomProtocolManagerClient::startLoading):
(WebKit::LegacyCustomProtocolManagerClient::stopLoading):
(WebKit::LegacyCustomProtocolManagerClient::invalidate):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitialize):
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Removed.
* UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp: Added.
(WebKit::LegacyCustomProtocolManagerProxy::LegacyCustomProtocolManagerProxy):
(WebKit::LegacyCustomProtocolManagerProxy::~LegacyCustomProtocolManagerProxy):
(WebKit::LegacyCustomProtocolManagerProxy::startLoading):
(WebKit::LegacyCustomProtocolManagerProxy::stopLoading):
(WebKit::LegacyCustomProtocolManagerProxy::processDidClose):
(WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest):
(WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse):
(WebKit::LegacyCustomProtocolManagerProxy::didLoadData):
(WebKit::LegacyCustomProtocolManagerProxy::didFailWithError):
(WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading):
* UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: Renamed from Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h.
* UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in: Renamed from Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in.
* UIProcess/Network/NetworkProcessProxy.cpp:
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient):
(WebKit::WebProcessPool::registerSchemeForCustomProtocol):
(WebKit::WebProcessPool::unregisterSchemeForCustomProtocol):
(WebKit::WebProcessPool::setCustomProtocolManagerClient): Deleted.
* UIProcess/WebProcessPool.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/cocoa/WebProcessCocoa.mm:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2CMakeListstxt">trunk/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DerivedSourcesmake">trunk/Source/WebKit2/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkSessioncpp">trunk/Source/WebKit2/NetworkProcess/NetworkSession.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkSessionh">trunk/Source/WebKit2/NetworkProcess/NetworkSession.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscocoaNetworkSessionCocoah">trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesscocoaNetworkSessionCocoamm">trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessmacRemoteNetworkingContextmm">trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPICustomProtocolManagerClienth">trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitCustomProtocolManagerClientcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitURISchemeRequestcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitURISchemeRequestPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebProcessPoolCocoamm">trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp">trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkNetworkProcessProxyh">trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolcpp">trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolh">trunk/Source/WebKit2/UIProcess/WebProcessPool.h</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm">trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolsCocoaLegacyCustomProtocolManagerCocoamm">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolsLegacyCustomProtocolManagercpp">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolsLegacyCustomProtocolManagerh">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolsLegacyCustomProtocolManagermessagesin">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolssoupLegacyCustomProtocolManagerSoupcpp">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaLegacyCustomProtocolManagerClienth">trunk/Source/WebKit2/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaLegacyCustomProtocolManagerClientmm">trunk/Source/WebKit2/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolsLegacyCustomProtocolManagerProxycpp">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolsLegacyCustomProtocolManagerProxyh">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolsLegacyCustomProtocolManagerProxymessagesin">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebLoadingProviderProxycpp">trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebLoadingProviderProxyh">trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebLoadingProviderProxymessagesin">trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.messages.in</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolsCocoaCustomProtocolManagerCocoamm">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagercpp">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagerh">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagermessagesin">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolssoupCustomProtocolManagerSoupcpp">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaCustomProtocolManagerClienth">trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaCustomProtocolManagerClientmm">trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxycpp">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxyh">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxymessagesin">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/CMakeLists.txt        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> endif ()
</span><span class="cx">
</span><span class="cx"> set(NetworkProcess_COMMON_SOURCES
</span><del>- NetworkProcess/CustomProtocols/CustomProtocolManager.cpp
</del><ins>+ NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp
</ins><span class="cx">
</span><span class="cx"> NetworkProcess/NetworkConnectionToWebProcess.cpp
</span><span class="cx"> NetworkProcess/NetworkDataTask.cpp
</span><span class="lines">@@ -420,7 +420,7 @@
</span><span class="cx">
</span><span class="cx"> UIProcess/Launcher/ProcessLauncher.cpp
</span><span class="cx">
</span><del>- UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp
</del><ins>+ UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp
</ins><span class="cx">
</span><span class="cx"> UIProcess/Network/NetworkProcessProxy.cpp
</span><span class="cx">
</span><span class="lines">@@ -592,7 +592,7 @@
</span><span class="cx">
</span><span class="cx"> DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in
</span><span class="cx">
</span><del>- NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in
</del><ins>+ NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in
</ins><span class="cx">
</span><span class="cx"> NetworkProcess/NetworkConnectionToWebProcess.messages.in
</span><span class="cx"> NetworkProcess/NetworkProcess.messages.in
</span><span class="lines">@@ -636,7 +636,7 @@
</span><span class="cx">
</span><span class="cx"> UIProcess/Network/NetworkProcessProxy.messages.in
</span><span class="cx">
</span><del>- UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in
</del><ins>+ UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in
</ins><span class="cx">
</span><span class="cx"> UIProcess/Plugins/PluginProcessProxy.messages.in
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,3 +1,136 @@
</span><ins>+2017-03-05 Brady Eidson <beidson@apple.com>
+
+ Rename CustomProtocolFoo to LegacyCustomProtocolFoo.
+ https://bugs.webkit.org/show_bug.cgi?id=169188
+
+ Reviewed by Andy Estes.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+
+ * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm.
+ (+[WKCustomProtocol canInitWithRequest:]):
+ (+[WKCustomProtocol canonicalRequestForRequest:]):
+ (+[WKCustomProtocol requestIsCacheEquivalent:toRequest:]):
+ (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
+ (-[WKCustomProtocol initializationRunLoop]):
+ (-[WKCustomProtocol startLoading]):
+ (-[WKCustomProtocol stopLoading]):
+ (WebKit::LegacyCustomProtocolManager::registerProtocolClass):
+ (WebKit::LegacyCustomProtocolManager::registerScheme):
+ (WebKit::LegacyCustomProtocolManager::unregisterScheme):
+ (WebKit::LegacyCustomProtocolManager::supportsScheme):
+ (WebKit::dispatchOnInitializationRunLoop):
+ (WebKit::LegacyCustomProtocolManager::didFailWithError):
+ (WebKit::LegacyCustomProtocolManager::didLoadData):
+ (WebKit::LegacyCustomProtocolManager::didReceiveResponse):
+ (WebKit::LegacyCustomProtocolManager::didFinishLoading):
+ (WebKit::LegacyCustomProtocolManager::wasRedirectedToRequest):
+ (WebKit::LegacyCustomProtocolManager::protocolForID):
+
+ * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.cpp.
+ (WebKit::generateCustomProtocolID):
+ (WebKit::LegacyCustomProtocolManager::supplementName):
+ (WebKit::LegacyCustomProtocolManager::LegacyCustomProtocolManager):
+ (WebKit::LegacyCustomProtocolManager::initialize):
+ (WebKit::LegacyCustomProtocolManager::addCustomProtocol):
+ (WebKit::LegacyCustomProtocolManager::removeCustomProtocol):
+ (WebKit::LegacyCustomProtocolManager::startLoading):
+ (WebKit::LegacyCustomProtocolManager::stopLoading):
+ * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h.
+ * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in.
+
+ * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp.
+ (WebKit::CustomProtocolManager::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
+ (WebKit::CustomProtocolManager::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
+ (WebKit::CustomProtocolManager::registerProtocolClass):
+ (WebKit::CustomProtocolManager::registerScheme):
+ (WebKit::CustomProtocolManager::unregisterScheme):
+ (WebKit::CustomProtocolManager::supportsScheme):
+ (WebKit::CustomProtocolManager::didFailWithError):
+ (WebKit::CustomProtocolManager::didLoadData):
+ (WebKit::CustomProtocolManager::didReceiveResponse):
+ (WebKit::CustomProtocolManager::didFinishLoading):
+ (WebKit::CustomProtocolManager::wasRedirectedToRequest):
+
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::NetworkProcess):
+
+ * NetworkProcess/NetworkSession.cpp:
+ (WebKit::NetworkSession::create):
+ * NetworkProcess/NetworkSession.h:
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.h:
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::globalLegacyCustomProtocolManager):
+ (WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager):
+ (WebKit::NetworkSessionCocoa::create):
+ (WebKit::NetworkSessionCocoa::defaultSession):
+ (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
+ (WebKit::globalCustomProtocolManager): Deleted.
+ (WebKit::NetworkSessionCocoa::setCustomProtocolManager): Deleted.
+
+ * NetworkProcess/mac/RemoteNetworkingContext.mm:
+ (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
+
+ * UIProcess/API/APICustomProtocolManagerClient.h:
+ (API::LegacyCustomProtocolManagerClient::~LegacyCustomProtocolManagerClient):
+ (API::LegacyCustomProtocolManagerClient::startLoading):
+ (API::LegacyCustomProtocolManagerClient::stopLoading):
+ (API::LegacyCustomProtocolManagerClient::invalidate):
+ (API::CustomProtocolManagerClient::~CustomProtocolManagerClient): Deleted.
+ (API::CustomProtocolManagerClient::startLoading): Deleted.
+ (API::CustomProtocolManagerClient::stopLoading): Deleted.
+ (API::CustomProtocolManagerClient::invalidate): Deleted.
+
+ * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.h.
+ * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm: Renamed from Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.mm.
+ (-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
+ (-[WKCustomProtocolLoader dealloc]):
+ (-[WKCustomProtocolLoader customProtocolManagerProxyDestroyed]):
+ (-[WKCustomProtocolLoader connection:didFailWithError:]):
+ (-[WKCustomProtocolLoader connection:willCacheResponse:]):
+ (-[WKCustomProtocolLoader connection:didReceiveResponse:]):
+ (-[WKCustomProtocolLoader connection:didReceiveData:]):
+ (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
+ (-[WKCustomProtocolLoader connectionDidFinishLoading:]):
+ (WebKit::LegacyCustomProtocolManagerClient::startLoading):
+ (WebKit::LegacyCustomProtocolManagerClient::stopLoading):
+ (WebKit::LegacyCustomProtocolManagerClient::invalidate):
+
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::WebProcessPool::platformInitialize):
+
+ * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp: Removed.
+ * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp: Added.
+ (WebKit::LegacyCustomProtocolManagerProxy::LegacyCustomProtocolManagerProxy):
+ (WebKit::LegacyCustomProtocolManagerProxy::~LegacyCustomProtocolManagerProxy):
+ (WebKit::LegacyCustomProtocolManagerProxy::startLoading):
+ (WebKit::LegacyCustomProtocolManagerProxy::stopLoading):
+ (WebKit::LegacyCustomProtocolManagerProxy::processDidClose):
+ (WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest):
+ (WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse):
+ (WebKit::LegacyCustomProtocolManagerProxy::didLoadData):
+ (WebKit::LegacyCustomProtocolManagerProxy::didFailWithError):
+ (WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading):
+ * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: Renamed from Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h.
+ * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in: Renamed from Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in.
+
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ * UIProcess/Network/NetworkProcessProxy.h:
+
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::WebProcessPool):
+ (WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient):
+ (WebKit::WebProcessPool::registerSchemeForCustomProtocol):
+ (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol):
+ (WebKit::WebProcessPool::setCustomProtocolManagerClient): Deleted.
+ * UIProcess/WebProcessPool.h:
+
+ * WebKit2.xcodeproj/project.pbxproj:
+
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+
</ins><span class="cx"> 2017-03-04 Eric Carlson <eric.carlson@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS] The web process should inherit application state from UI process
</span></span></pre></div>
<a id="trunkSourceWebKit2DerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DerivedSources.make (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DerivedSources.make        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/DerivedSources.make        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -88,8 +88,6 @@
</span><span class="cx"> MESSAGE_RECEIVERS = \
</span><span class="cx"> AuthenticationManager \
</span><span class="cx"> ChildProcess \
</span><del>- CustomProtocolManager \
- CustomProtocolManagerProxy \
</del><span class="cx"> DatabaseProcess \
</span><span class="cx"> DatabaseProcessProxy \
</span><span class="cx"> DatabaseToWebProcessConnection \
</span><span class="lines">@@ -97,6 +95,8 @@
</span><span class="cx"> DrawingArea \
</span><span class="cx"> DrawingAreaProxy \
</span><span class="cx"> EventDispatcher \
</span><ins>+ LegacyCustomProtocolManager \
+ LegacyCustomProtocolManagerProxy \
</ins><span class="cx"> NPObjectMessageReceiver \
</span><span class="cx"> NetworkConnectionToWebProcess \
</span><span class="cx"> NetworkProcess \
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolsCocoaCustomProtocolManagerCocoamm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,232 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "CustomProtocolManager.h"
-
-#import "CustomProtocolManagerMessages.h"
-#import "DataReference.h"
-#import "NetworkProcess.h"
-#import <Foundation/NSURLSession.h>
-#import <WebCore/NSURLConnectionSPI.h>
-#import <WebCore/URL.h>
-#import <WebCore/ResourceError.h>
-#import <WebCore/ResourceRequest.h>
-#import <WebCore/ResourceResponse.h>
-#import <WebCore/TextEncoding.h>
-
-using namespace WebKit;
-
-@interface WKCustomProtocol : NSURLProtocol {
-@private
- uint64_t _customProtocolID;
- RetainPtr<CFRunLoopRef> _initializationRunLoop;
-}
-@property (nonatomic, readonly) uint64_t customProtocolID;
-@property (nonatomic, readonly) CFRunLoopRef initializationRunLoop;
-@end
-
-@implementation WKCustomProtocol
-
-@synthesize customProtocolID = _customProtocolID;
-
-+ (BOOL)canInitWithRequest:(NSURLRequest *)request
-{
- if (auto* customProtocolManager = NetworkProcess::singleton().supplement<CustomProtocolManager>())
- return customProtocolManager->supportsScheme([[[request URL] scheme] lowercaseString]);
- return NO;
-}
-
-+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
-{
- return request;
-}
-
-+ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b
-{
- return NO;
-}
-
-- (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLResponse *)cachedResponse client:(id<NSURLProtocolClient>)client
-{
- self = [super initWithRequest:request cachedResponse:cachedResponse client:client];
- if (!self)
- return nil;
-
- if (auto* customProtocolManager = NetworkProcess::singleton().supplement<CustomProtocolManager>())
- _customProtocolID = customProtocolManager->addCustomProtocol(self);
- _initializationRunLoop = CFRunLoopGetCurrent();
-
- return self;
-}
-
-- (CFRunLoopRef)initializationRunLoop
-{
- return _initializationRunLoop.get();
-}
-
-- (void)startLoading
-{
- if (auto* customProtocolManager = NetworkProcess::singleton().supplement<CustomProtocolManager>())
- customProtocolManager->startLoading(self.customProtocolID, [self request]);
-}
-
-- (void)stopLoading
-{
- if (auto* customProtocolManager = NetworkProcess::singleton().supplement<CustomProtocolManager>()) {
- customProtocolManager->stopLoading(self.customProtocolID);
- customProtocolManager->removeCustomProtocol(self.customProtocolID);
- }
-}
-
-@end
-
-namespace WebKit {
-
-void CustomProtocolManager::registerProtocolClass()
-{
-#if !USE(NETWORK_SESSION)
- [NSURLProtocol registerClass:[WKCustomProtocol class]];
-#endif
-}
-
-#if USE(NETWORK_SESSION)
-void CustomProtocolManager::registerProtocolClass(NSURLSessionConfiguration *configuration)
-{
- configuration.protocolClasses = @[[WKCustomProtocol class]];
-}
-#endif
-
-void CustomProtocolManager::registerScheme(const String& scheme)
-{
- ASSERT(!scheme.isNull());
- LockHolder locker(m_registeredSchemesMutex);
- m_registeredSchemes.add(scheme);
-}
-
-void CustomProtocolManager::unregisterScheme(const String& scheme)
-{
- ASSERT(!scheme.isNull());
- LockHolder locker(m_registeredSchemesMutex);
- m_registeredSchemes.remove(scheme);
-}
-
-bool CustomProtocolManager::supportsScheme(const String& scheme)
-{
- if (scheme.isNull())
- return false;
-
- LockHolder locker(m_registeredSchemesMutex);
- return m_registeredSchemes.contains(scheme);
-}
-
-static inline void dispatchOnInitializationRunLoop(WKCustomProtocol* protocol, void (^block)())
-{
- CFRunLoopRef runloop = protocol.initializationRunLoop;
- CFRunLoopPerformBlock(runloop, kCFRunLoopDefaultMode, block);
- CFRunLoopWakeUp(runloop);
-}
-
-void CustomProtocolManager::didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError& error)
-{
- RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
- if (!protocol)
- return;
-
- RetainPtr<NSError> nsError = error.nsError();
-
- dispatchOnInitializationRunLoop(protocol.get(), ^ {
- [[protocol client] URLProtocol:protocol.get() didFailWithError:nsError.get()];
- });
-
- removeCustomProtocol(customProtocolID);
-}
-
-void CustomProtocolManager::didLoadData(uint64_t customProtocolID, const IPC::DataReference& data)
-{
- RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
- if (!protocol)
- return;
-
- RetainPtr<NSData> nsData = adoptNS([[NSData alloc] initWithBytes:data.data() length:data.size()]);
-
- dispatchOnInitializationRunLoop(protocol.get(), ^ {
- [[protocol client] URLProtocol:protocol.get() didLoadData:nsData.get()];
- });
-}
-
-void CustomProtocolManager::didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse& response, uint32_t cacheStoragePolicy)
-{
- RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
- if (!protocol)
- return;
-
- RetainPtr<NSURLResponse> nsResponse = response.nsURLResponse();
-
- dispatchOnInitializationRunLoop(protocol.get(), ^ {
- [[protocol client] URLProtocol:protocol.get() didReceiveResponse:nsResponse.get() cacheStoragePolicy:static_cast<NSURLCacheStoragePolicy>(cacheStoragePolicy)];
- });
-}
-
-void CustomProtocolManager::didFinishLoading(uint64_t customProtocolID)
-{
- RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
- if (!protocol)
- return;
-
- dispatchOnInitializationRunLoop(protocol.get(), ^ {
- [[protocol client] URLProtocolDidFinishLoading:protocol.get()];
- });
-
- removeCustomProtocol(customProtocolID);
-}
-
-void CustomProtocolManager::wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse)
-{
- RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
- if (!protocol)
- return;
-
- RetainPtr<NSURLRequest> nsRequest = request.nsURLRequest(WebCore::DoNotUpdateHTTPBody);
- RetainPtr<NSURLResponse> nsRedirectResponse = redirectResponse.nsURLResponse();
-
- dispatchOnInitializationRunLoop(protocol.get(), [protocol, nsRequest, nsRedirectResponse]() {
- [[protocol client] URLProtocol:protocol.get() wasRedirectedToRequest:nsRequest.get() redirectResponse:nsRedirectResponse.get()];
- });
-}
-
-RetainPtr<WKCustomProtocol> CustomProtocolManager::protocolForID(uint64_t customProtocolID)
-{
- LockHolder locker(m_customProtocolMapMutex);
-
- CustomProtocolMap::const_iterator it = m_customProtocolMap.find(customProtocolID);
- if (it == m_customProtocolMap.end())
- return nil;
-
- ASSERT(it->value);
- return it->value;
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolsCocoaLegacyCustomProtocolManagerCocoammfromrev213440trunkSourceWebKit2NetworkProcessCustomProtocolsCocoaCustomProtocolManagerCocoamm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm (from rev 213440, trunk/Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm         (rev 0)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,232 @@
</span><ins>+/*
+ * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "LegacyCustomProtocolManager.h"
+
+#import "DataReference.h"
+#import "LegacyCustomProtocolManagerMessages.h"
+#import "NetworkProcess.h"
+#import <Foundation/NSURLSession.h>
+#import <WebCore/NSURLConnectionSPI.h>
+#import <WebCore/ResourceError.h>
+#import <WebCore/ResourceRequest.h>
+#import <WebCore/ResourceResponse.h>
+#import <WebCore/TextEncoding.h>
+#import <WebCore/URL.h>
+
+using namespace WebKit;
+
+@interface WKCustomProtocol : NSURLProtocol {
+@private
+ uint64_t _customProtocolID;
+ RetainPtr<CFRunLoopRef> _initializationRunLoop;
+}
+@property (nonatomic, readonly) uint64_t customProtocolID;
+@property (nonatomic, readonly) CFRunLoopRef initializationRunLoop;
+@end
+
+@implementation WKCustomProtocol
+
+@synthesize customProtocolID=_customProtocolID;
+
++ (BOOL)canInitWithRequest:(NSURLRequest *)request
+{
+ if (auto* customProtocolManager = NetworkProcess::singleton().supplement<LegacyCustomProtocolManager>())
+ return customProtocolManager->supportsScheme([[[request URL] scheme] lowercaseString]);
+ return NO;
+}
+
++ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
+{
+ return request;
+}
+
++ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b
+{
+ return NO;
+}
+
+- (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLResponse *)cachedResponse client:(id<NSURLProtocolClient>)client
+{
+ self = [super initWithRequest:request cachedResponse:cachedResponse client:client];
+ if (!self)
+ return nil;
+
+ if (auto* customProtocolManager = NetworkProcess::singleton().supplement<LegacyCustomProtocolManager>())
+ _customProtocolID = customProtocolManager->addCustomProtocol(self);
+ _initializationRunLoop = CFRunLoopGetCurrent();
+
+ return self;
+}
+
+- (CFRunLoopRef)initializationRunLoop
+{
+ return _initializationRunLoop.get();
+}
+
+- (void)startLoading
+{
+ if (auto* customProtocolManager = NetworkProcess::singleton().supplement<LegacyCustomProtocolManager>())
+ customProtocolManager->startLoading(self.customProtocolID, [self request]);
+}
+
+- (void)stopLoading
+{
+ if (auto* customProtocolManager = NetworkProcess::singleton().supplement<LegacyCustomProtocolManager>()) {
+ customProtocolManager->stopLoading(self.customProtocolID);
+ customProtocolManager->removeCustomProtocol(self.customProtocolID);
+ }
+}
+
+@end
+
+namespace WebKit {
+
+void LegacyCustomProtocolManager::registerProtocolClass()
+{
+#if !USE(NETWORK_SESSION)
+ [NSURLProtocol registerClass:[WKCustomProtocol class]];
+#endif
+}
+
+#if USE(NETWORK_SESSION)
+void LegacyCustomProtocolManager::registerProtocolClass(NSURLSessionConfiguration *configuration)
+{
+ configuration.protocolClasses = @[[WKCustomProtocol class]];
+}
+#endif
+
+void LegacyCustomProtocolManager::registerScheme(const String& scheme)
+{
+ ASSERT(!scheme.isNull());
+ LockHolder locker(m_registeredSchemesMutex);
+ m_registeredSchemes.add(scheme);
+}
+
+void LegacyCustomProtocolManager::unregisterScheme(const String& scheme)
+{
+ ASSERT(!scheme.isNull());
+ LockHolder locker(m_registeredSchemesMutex);
+ m_registeredSchemes.remove(scheme);
+}
+
+bool LegacyCustomProtocolManager::supportsScheme(const String& scheme)
+{
+ if (scheme.isNull())
+ return false;
+
+ LockHolder locker(m_registeredSchemesMutex);
+ return m_registeredSchemes.contains(scheme);
+}
+
+static inline void dispatchOnInitializationRunLoop(WKCustomProtocol* protocol, void (^block)())
+{
+ CFRunLoopRef runloop = protocol.initializationRunLoop;
+ CFRunLoopPerformBlock(runloop, kCFRunLoopDefaultMode, block);
+ CFRunLoopWakeUp(runloop);
+}
+
+void LegacyCustomProtocolManager::didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError& error)
+{
+ RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
+ if (!protocol)
+ return;
+
+ RetainPtr<NSError> nsError = error.nsError();
+
+ dispatchOnInitializationRunLoop(protocol.get(), ^ {
+ [[protocol client] URLProtocol:protocol.get() didFailWithError:nsError.get()];
+ });
+
+ removeCustomProtocol(customProtocolID);
+}
+
+void LegacyCustomProtocolManager::didLoadData(uint64_t customProtocolID, const IPC::DataReference& data)
+{
+ RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
+ if (!protocol)
+ return;
+
+ RetainPtr<NSData> nsData = adoptNS([[NSData alloc] initWithBytes:data.data() length:data.size()]);
+
+ dispatchOnInitializationRunLoop(protocol.get(), ^ {
+ [[protocol client] URLProtocol:protocol.get() didLoadData:nsData.get()];
+ });
+}
+
+void LegacyCustomProtocolManager::didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse& response, uint32_t cacheStoragePolicy)
+{
+ RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
+ if (!protocol)
+ return;
+
+ RetainPtr<NSURLResponse> nsResponse = response.nsURLResponse();
+
+ dispatchOnInitializationRunLoop(protocol.get(), ^ {
+ [[protocol client] URLProtocol:protocol.get() didReceiveResponse:nsResponse.get() cacheStoragePolicy:static_cast<NSURLCacheStoragePolicy>(cacheStoragePolicy)];
+ });
+}
+
+void LegacyCustomProtocolManager::didFinishLoading(uint64_t customProtocolID)
+{
+ RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
+ if (!protocol)
+ return;
+
+ dispatchOnInitializationRunLoop(protocol.get(), ^ {
+ [[protocol client] URLProtocolDidFinishLoading:protocol.get()];
+ });
+
+ removeCustomProtocol(customProtocolID);
+}
+
+void LegacyCustomProtocolManager::wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse)
+{
+ RetainPtr<WKCustomProtocol> protocol = protocolForID(customProtocolID);
+ if (!protocol)
+ return;
+
+ RetainPtr<NSURLRequest> nsRequest = request.nsURLRequest(WebCore::DoNotUpdateHTTPBody);
+ RetainPtr<NSURLResponse> nsRedirectResponse = redirectResponse.nsURLResponse();
+
+ dispatchOnInitializationRunLoop(protocol.get(), [protocol, nsRequest, nsRedirectResponse]() {
+ [[protocol client] URLProtocol:protocol.get() wasRedirectedToRequest:nsRequest.get() redirectResponse:nsRedirectResponse.get()];
+ });
+}
+
+RetainPtr<WKCustomProtocol> LegacyCustomProtocolManager::protocolForID(uint64_t customProtocolID)
+{
+ LockHolder locker(m_customProtocolMapMutex);
+
+ CustomProtocolMap::const_iterator it = m_customProtocolMap.find(customProtocolID);
+ if (it == m_customProtocolMap.end())
+ return nil;
+
+ ASSERT(it->value);
+ return it->value;
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,88 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
- * Copyright (C) 2017 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "CustomProtocolManager.h"
-
-#include "ChildProcess.h"
-#include "CustomProtocolManagerMessages.h"
-#include "CustomProtocolManagerProxyMessages.h"
-#include "NetworkProcessCreationParameters.h"
-#include "WebCoreArgumentCoders.h"
-#include <WebCore/ResourceRequest.h>
-
-namespace WebKit {
-
-static uint64_t generateCustomProtocolID()
-{
- static uint64_t uniqueCustomProtocolID = 0;
- return ++uniqueCustomProtocolID;
-}
-
-const char* CustomProtocolManager::supplementName()
-{
- return "CustomProtocolManager";
-}
-
-CustomProtocolManager::CustomProtocolManager(ChildProcess* childProcess)
- : m_childProcess(childProcess)
-{
- m_childProcess->addMessageReceiver(Messages::CustomProtocolManager::messageReceiverName(), *this);
-}
-
-void CustomProtocolManager::initialize(const NetworkProcessCreationParameters& parameters)
-{
- registerProtocolClass();
-
- for (const auto& scheme : parameters.urlSchemesRegisteredForCustomProtocols)
- registerScheme(scheme);
-}
-
-uint64_t CustomProtocolManager::addCustomProtocol(CustomProtocol&& customProtocol)
-{
- LockHolder locker(m_customProtocolMapMutex);
- auto customProtocolID = generateCustomProtocolID();
- m_customProtocolMap.add(customProtocolID, WTFMove(customProtocol));
- return customProtocolID;
-}
-
-void CustomProtocolManager::removeCustomProtocol(uint64_t customProtocolID)
-{
- LockHolder locker(m_customProtocolMapMutex);
- m_customProtocolMap.remove(customProtocolID);
-}
-
-void CustomProtocolManager::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest& request)
-{
- m_childProcess->send(Messages::CustomProtocolManagerProxy::StartLoading(customProtocolID, request));
-}
-
-void CustomProtocolManager::stopLoading(uint64_t customProtocolID)
-{
- m_childProcess->send(Messages::CustomProtocolManagerProxy::StopLoading(customProtocolID), 0);
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,137 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "MessageReceiver.h"
-#include "NetworkProcessSupplement.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
-
-#if PLATFORM(COCOA)
-#include <wtf/RetainPtr.h>
-OBJC_CLASS NSURLSessionConfiguration;
-OBJC_CLASS WKCustomProtocol;
-#endif
-
-#if USE(SOUP)
-#include <wtf/glib/GRefPtr.h>
-
-typedef struct _GCancellable GCancellable;
-typedef struct _GInputStream GInputStream;
-typedef struct _GTask GTask;
-typedef struct _WebKitSoupRequestGeneric WebKitSoupRequestGeneric;
-#endif
-
-namespace IPC {
-class DataReference;
-} // namespace IPC
-
-namespace WebCore {
-class ResourceError;
-class ResourceRequest;
-class ResourceResponse;
-} // namespace WebCore
-
-namespace WebKit {
-
-class ChildProcess;
-struct NetworkProcessCreationParameters;
-
-class CustomProtocolManager : public NetworkProcessSupplement, public IPC::MessageReceiver {
- WTF_MAKE_NONCOPYABLE(CustomProtocolManager);
-public:
- explicit CustomProtocolManager(ChildProcess*);
-
- static const char* supplementName();
-
- void registerScheme(const String&);
- void unregisterScheme(const String&);
- bool supportsScheme(const String&);
-
-#if PLATFORM(COCOA)
- typedef RetainPtr<WKCustomProtocol> CustomProtocol;
-#endif
-#if USE(SOUP)
- struct WebSoupRequestAsyncData {
- WebSoupRequestAsyncData(GRefPtr<GTask>&&, WebKitSoupRequestGeneric*);
- ~WebSoupRequestAsyncData();
-
- GRefPtr<GTask> task;
- WebKitSoupRequestGeneric* request;
- GRefPtr<GCancellable> cancellable;
- GRefPtr<GInputStream> stream;
- };
- typedef std::unique_ptr<WebSoupRequestAsyncData> CustomProtocol;
-#endif
-
- uint64_t addCustomProtocol(CustomProtocol&&);
- void removeCustomProtocol(uint64_t customProtocolID);
- void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&);
- void stopLoading(uint64_t customProtocolID);
-
-#if PLATFORM(COCOA) && USE(NETWORK_SESSION)
- void registerProtocolClass(NSURLSessionConfiguration*);
-#endif
-
-private:
- // NetworkProcessSupplement
- void initialize(const NetworkProcessCreationParameters&) override;
-
- // IPC::MessageReceiver
- void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
-
- void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&);
- void didLoadData(uint64_t customProtocolID, const IPC::DataReference&);
- void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&, uint32_t cacheStoragePolicy);
- void didFinishLoading(uint64_t customProtocolID);
- void wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
-
- void registerProtocolClass();
-
- ChildProcess* m_childProcess;
-
- typedef HashMap<uint64_t, CustomProtocol> CustomProtocolMap;
- CustomProtocolMap m_customProtocolMap;
- Lock m_customProtocolMapMutex;
-
-#if PLATFORM(COCOA)
- HashSet<String, ASCIICaseInsensitiveHash> m_registeredSchemes;
- Lock m_registeredSchemesMutex;
-
- // WKCustomProtocol objects can be removed from the m_customProtocolMap from multiple threads.
- // We return a RetainPtr here because it is unsafe to return a raw pointer since the object might immediately be destroyed from a different thread.
- RetainPtr<WKCustomProtocol> protocolForID(uint64_t customProtocolID);
-#endif
-
-#if USE(SOUP)
- GRefPtr<GPtrArray> m_registeredSchemes;
-#endif
-};
-
-} // namespace WebKit
-
</del></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagermessagesin"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,32 +0,0 @@
</span><del>-# Copyright (C) 2012 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-messages -> CustomProtocolManager {
- DidFailWithError(uint64_t customProtocolID, WebCore::ResourceError error)
- DidLoadData(uint64_t customProtocolID, IPC::DataReference data)
- DidReceiveResponse(uint64_t customProtocolID, WebCore::ResourceResponse response, uint32_t cacheStoragePolicy)
- DidFinishLoading(uint64_t customProtocolID)
- WasRedirectedToRequest(uint64_t customProtocolID, WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse);
-
- RegisterScheme(String name)
- UnregisterScheme(String name)
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolsLegacyCustomProtocolManagercppfromrev213440trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp (from rev 213440, trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.cpp) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp         (rev 0)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,88 @@
</span><ins>+/*
+ * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LegacyCustomProtocolManager.h"
+
+#include "ChildProcess.h"
+#include "LegacyCustomProtocolManagerMessages.h"
+#include "LegacyCustomProtocolManagerProxyMessages.h"
+#include "NetworkProcessCreationParameters.h"
+#include "WebCoreArgumentCoders.h"
+#include <WebCore/ResourceRequest.h>
+
+namespace WebKit {
+
+static uint64_t generateCustomProtocolID()
+{
+ static uint64_t uniqueCustomProtocolID = 0;
+ return ++uniqueCustomProtocolID;
+}
+
+const char* LegacyCustomProtocolManager::supplementName()
+{
+ return "LegacyCustomProtocolManager";
+}
+
+LegacyCustomProtocolManager::LegacyCustomProtocolManager(ChildProcess* childProcess)
+ : m_childProcess(childProcess)
+{
+ m_childProcess->addMessageReceiver(Messages::LegacyCustomProtocolManager::messageReceiverName(), *this);
+}
+
+void LegacyCustomProtocolManager::initialize(const NetworkProcessCreationParameters& parameters)
+{
+ registerProtocolClass();
+
+ for (const auto& scheme : parameters.urlSchemesRegisteredForCustomProtocols)
+ registerScheme(scheme);
+}
+
+uint64_t LegacyCustomProtocolManager::addCustomProtocol(CustomProtocol&& customProtocol)
+{
+ LockHolder locker(m_customProtocolMapMutex);
+ auto customProtocolID = generateCustomProtocolID();
+ m_customProtocolMap.add(customProtocolID, WTFMove(customProtocol));
+ return customProtocolID;
+}
+
+void LegacyCustomProtocolManager::removeCustomProtocol(uint64_t customProtocolID)
+{
+ LockHolder locker(m_customProtocolMapMutex);
+ m_customProtocolMap.remove(customProtocolID);
+}
+
+void LegacyCustomProtocolManager::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest& request)
+{
+ m_childProcess->send(Messages::LegacyCustomProtocolManagerProxy::StartLoading(customProtocolID, request));
+}
+
+void LegacyCustomProtocolManager::stopLoading(uint64_t customProtocolID)
+{
+ m_childProcess->send(Messages::LegacyCustomProtocolManagerProxy::StopLoading(customProtocolID), 0);
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolsLegacyCustomProtocolManagerhfromrev213440trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagerh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h (from rev 213440, trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h         (rev 0)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+/*
+ * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "MessageReceiver.h"
+#include "NetworkProcessSupplement.h"
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/text/WTFString.h>
+
+#if PLATFORM(COCOA)
+#include <wtf/RetainPtr.h>
+OBJC_CLASS NSURLSessionConfiguration;
+OBJC_CLASS WKCustomProtocol;
+#endif
+
+#if USE(SOUP)
+#include <wtf/glib/GRefPtr.h>
+
+typedef struct _GCancellable GCancellable;
+typedef struct _GInputStream GInputStream;
+typedef struct _GTask GTask;
+typedef struct _WebKitSoupRequestGeneric WebKitSoupRequestGeneric;
+#endif
+
+namespace IPC {
+class DataReference;
+} // namespace IPC
+
+namespace WebCore {
+class ResourceError;
+class ResourceRequest;
+class ResourceResponse;
+} // namespace WebCore
+
+namespace WebKit {
+
+class ChildProcess;
+struct NetworkProcessCreationParameters;
+
+class LegacyCustomProtocolManager : public NetworkProcessSupplement, public IPC::MessageReceiver {
+ WTF_MAKE_NONCOPYABLE(LegacyCustomProtocolManager);
+public:
+ explicit LegacyCustomProtocolManager(ChildProcess*);
+
+ static const char* supplementName();
+
+ void registerScheme(const String&);
+ void unregisterScheme(const String&);
+ bool supportsScheme(const String&);
+
+#if PLATFORM(COCOA)
+ typedef RetainPtr<WKCustomProtocol> CustomProtocol;
+#endif
+#if USE(SOUP)
+ struct WebSoupRequestAsyncData {
+ WebSoupRequestAsyncData(GRefPtr<GTask>&&, WebKitSoupRequestGeneric*);
+ ~WebSoupRequestAsyncData();
+
+ GRefPtr<GTask> task;
+ WebKitSoupRequestGeneric* request;
+ GRefPtr<GCancellable> cancellable;
+ GRefPtr<GInputStream> stream;
+ };
+ typedef std::unique_ptr<WebSoupRequestAsyncData> CustomProtocol;
+#endif
+
+ uint64_t addCustomProtocol(CustomProtocol&&);
+ void removeCustomProtocol(uint64_t customProtocolID);
+ void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&);
+ void stopLoading(uint64_t customProtocolID);
+
+#if PLATFORM(COCOA) && USE(NETWORK_SESSION)
+ void registerProtocolClass(NSURLSessionConfiguration*);
+#endif
+
+private:
+ // NetworkProcessSupplement
+ void initialize(const NetworkProcessCreationParameters&) override;
+
+ // IPC::MessageReceiver
+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
+
+ void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&);
+ void didLoadData(uint64_t customProtocolID, const IPC::DataReference&);
+ void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&, uint32_t cacheStoragePolicy);
+ void didFinishLoading(uint64_t customProtocolID);
+ void wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
+
+ void registerProtocolClass();
+
+ ChildProcess* m_childProcess;
+
+ typedef HashMap<uint64_t, CustomProtocol> CustomProtocolMap;
+ CustomProtocolMap m_customProtocolMap;
+ Lock m_customProtocolMapMutex;
+
+#if PLATFORM(COCOA)
+ HashSet<String, ASCIICaseInsensitiveHash> m_registeredSchemes;
+ Lock m_registeredSchemesMutex;
+
+ // WKCustomProtocol objects can be removed from the m_customProtocolMap from multiple threads.
+ // We return a RetainPtr here because it is unsafe to return a raw pointer since the object might immediately be destroyed from a different thread.
+ RetainPtr<WKCustomProtocol> protocolForID(uint64_t customProtocolID);
+#endif
+
+#if USE(SOUP)
+ GRefPtr<GPtrArray> m_registeredSchemes;
+#endif
+};
+
+} // namespace WebKit
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolsLegacyCustomProtocolManagermessagesinfromrev213440trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagermessagesin"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in (from rev 213440, trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in         (rev 0)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+# Copyright (C) 2012 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -> LegacyCustomProtocolManager {
+ DidFailWithError(uint64_t customProtocolID, WebCore::ResourceError error)
+ DidLoadData(uint64_t customProtocolID, IPC::DataReference data)
+ DidReceiveResponse(uint64_t customProtocolID, WebCore::ResourceResponse response, uint32_t cacheStoragePolicy)
+ DidFinishLoading(uint64_t customProtocolID)
+ WasRedirectedToRequest(uint64_t customProtocolID, WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse);
+
+ RegisterScheme(String name)
+ UnregisterScheme(String name)
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolssoupCustomProtocolManagerSoupcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,209 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "CustomProtocolManager.h"
-
-#include "CustomProtocolManagerMessages.h"
-#include "DataReference.h"
-#include "NetworkProcess.h"
-#include "WebKitSoupRequestInputStream.h"
-#include <WebCore/NetworkStorageSession.h>
-#include <WebCore/NotImplemented.h>
-#include <WebCore/ResourceError.h>
-#include <WebCore/ResourceRequest.h>
-#include <WebCore/ResourceResponse.h>
-#include <WebCore/SoupNetworkSession.h>
-#include <WebCore/WebKitSoupRequestGeneric.h>
-#include <wtf/NeverDestroyed.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-
-CustomProtocolManager::WebSoupRequestAsyncData::WebSoupRequestAsyncData(GRefPtr<GTask>&& requestTask, WebKitSoupRequestGeneric* requestGeneric)
- : task(WTFMove(requestTask))
- , request(requestGeneric)
- , cancellable(g_task_get_cancellable(task.get()))
-{
- // If the struct contains a null request, it is because the request failed.
- g_object_add_weak_pointer(G_OBJECT(request), reinterpret_cast<void**>(&request));
-}
-
-CustomProtocolManager::WebSoupRequestAsyncData::~WebSoupRequestAsyncData()
-{
- if (request)
- g_object_remove_weak_pointer(G_OBJECT(request), reinterpret_cast<void**>(&request));
-}
-
-class CustomProtocolRequestClient final : public WebKitSoupRequestGenericClient {
-public:
- static CustomProtocolRequestClient& singleton()
- {
- static NeverDestroyed<CustomProtocolRequestClient> client;
- return client;
- }
-
-private:
- void startRequest(GRefPtr<GTask>&& task) override
- {
- WebKitSoupRequestGeneric* request = WEBKIT_SOUP_REQUEST_GENERIC(g_task_get_source_object(task.get()));
- auto* customProtocolManager = NetworkProcess::singleton().supplement<CustomProtocolManager>();
- if (!customProtocolManager)
- return;
-
- auto customProtocolID = customProtocolManager->addCustomProtocol(std::make_unique<CustomProtocolManager::WebSoupRequestAsyncData>(WTFMove(task), request));
- customProtocolManager->startLoading(customProtocolID, webkitSoupRequestGenericGetRequest(request));
- }
-};
-
-void CustomProtocolManager::registerProtocolClass()
-{
- static_cast<WebKitSoupRequestGenericClass*>(g_type_class_ref(WEBKIT_TYPE_SOUP_REQUEST_GENERIC))->client = &CustomProtocolRequestClient::singleton();
- SoupNetworkSession::setCustomProtocolRequestType(WEBKIT_TYPE_SOUP_REQUEST_GENERIC);
-}
-
-void CustomProtocolManager::registerScheme(const String& scheme)
-{
- if (!m_registeredSchemes)
- m_registeredSchemes = adoptGRef(g_ptr_array_new_with_free_func(g_free));
-
- if (m_registeredSchemes->len)
- g_ptr_array_remove_index_fast(m_registeredSchemes.get(), m_registeredSchemes->len - 1);
- g_ptr_array_add(m_registeredSchemes.get(), g_strdup(scheme.utf8().data()));
- g_ptr_array_add(m_registeredSchemes.get(), nullptr);
-
- auto* genericRequestClass = static_cast<SoupRequestClass*>(g_type_class_peek(WEBKIT_TYPE_SOUP_REQUEST_GENERIC));
- ASSERT(genericRequestClass);
- genericRequestClass->schemes = const_cast<const char**>(reinterpret_cast<char**>(m_registeredSchemes->pdata));
- NetworkStorageSession::forEach([](const WebCore::NetworkStorageSession& session) {
- if (auto* soupSession = session.soupNetworkSession())
- soupSession->setupCustomProtocols();
- });
-}
-
-void CustomProtocolManager::unregisterScheme(const String&)
-{
- notImplemented();
-}
-
-bool CustomProtocolManager::supportsScheme(const String& scheme)
-{
- if (scheme.isNull())
- return false;
-
- CString cScheme = scheme.utf8();
- for (unsigned i = 0; i < m_registeredSchemes->len; ++i) {
- if (cScheme == static_cast<char*>(g_ptr_array_index(m_registeredSchemes.get(), i)))
- return true;
- }
-
- return false;
-}
-
-void CustomProtocolManager::didFailWithError(uint64_t customProtocolID, const ResourceError& error)
-{
- auto* data = m_customProtocolMap.get(customProtocolID);
- ASSERT(data);
-
- // Either we haven't started reading the stream yet, in which case we need to complete the
- // task first, or we failed reading it and the task was already completed by didLoadData().
- ASSERT(!data->stream || !data->task);
-
- if (!data->stream) {
- GRefPtr<GTask> task = std::exchange(data->task, nullptr);
- ASSERT(task.get());
- g_task_return_new_error(task.get(), g_quark_from_string(error.domain().utf8().data()),
- error.errorCode(), "%s", error.localizedDescription().utf8().data());
- } else
- webkitSoupRequestInputStreamDidFailWithError(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get()), error);
-
- removeCustomProtocol(customProtocolID);
-}
-
-void CustomProtocolManager::didLoadData(uint64_t customProtocolID, const IPC::DataReference& dataReference)
-{
- auto* data = m_customProtocolMap.get(customProtocolID);
- // The data might have been removed from the request map if a previous chunk failed
- // and a new message was sent by the UI process before being notified about the failure.
- if (!data)
- return;
-
- if (!data->stream) {
- GRefPtr<GTask> task = std::exchange(data->task, nullptr);
- ASSERT(task.get());
-
- goffset soupContentLength = soup_request_get_content_length(SOUP_REQUEST(g_task_get_source_object(task.get())));
- uint64_t contentLength = soupContentLength == -1 ? 0 : static_cast<uint64_t>(soupContentLength);
- if (!dataReference.size()) {
- // Empty reply, just create and empty GMemoryInputStream.
- data->stream = g_memory_input_stream_new();
- } else if (dataReference.size() == contentLength) {
- // We don't expect more data, so we can just create a GMemoryInputStream with all the data.
- data->stream = g_memory_input_stream_new_from_data(g_memdup(dataReference.data(), dataReference.size()), contentLength, g_free);
- } else {
- // We expect more data chunks from the UI process.
- data->stream = webkitSoupRequestInputStreamNew(contentLength);
- webkitSoupRequestInputStreamAddData(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get()), dataReference.data(), dataReference.size());
- }
- g_task_return_pointer(task.get(), data->stream.get(), g_object_unref);
- return;
- }
-
- if (g_cancellable_is_cancelled(data->cancellable.get()) || !data->request) {
- // ResourceRequest failed or it was cancelled. It doesn't matter here the error or if it was cancelled,
- // because that's already handled by the resource handle client, we just want to notify the UI process
- // to stop reading data from the user input stream. If UI process already sent all the data we simply
- // finish silently.
- if (!webkitSoupRequestInputStreamFinished(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get())))
- stopLoading(customProtocolID);
-
- return;
- }
-
- webkitSoupRequestInputStreamAddData(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get()), dataReference.data(), dataReference.size());
-}
-
-void CustomProtocolManager::didReceiveResponse(uint64_t customProtocolID, const ResourceResponse& response, uint32_t)
-{
- auto* data = m_customProtocolMap.get(customProtocolID);
- // The data might have been removed from the request map if an error happened even before this point.
- if (!data)
- return;
-
- ASSERT(data->task);
-
- WebKitSoupRequestGeneric* request = WEBKIT_SOUP_REQUEST_GENERIC(g_task_get_source_object(data->task.get()));
- webkitSoupRequestGenericSetContentLength(request, response.expectedContentLength() ? response.expectedContentLength() : -1);
- webkitSoupRequestGenericSetContentType(request, !response.mimeType().isEmpty() ? response.mimeType().utf8().data() : 0);
-}
-
-void CustomProtocolManager::didFinishLoading(uint64_t customProtocolID)
-{
- ASSERT(m_customProtocolMap.contains(customProtocolID));
- removeCustomProtocol(customProtocolID);
-}
-
-void CustomProtocolManager::wasRedirectedToRequest(uint64_t, const ResourceRequest&, const ResourceResponse&)
-{
- notImplemented();
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolssoupLegacyCustomProtocolManagerSoupcppfromrev213440trunkSourceWebKit2NetworkProcessCustomProtocolssoupCustomProtocolManagerSoupcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp (from rev 213440, trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp         (rev 0)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,209 @@
</span><ins>+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "LegacyCustomProtocolManager.h"
+
+#include "DataReference.h"
+#include "LegacyCustomProtocolManagerMessages.h"
+#include "NetworkProcess.h"
+#include "WebKitSoupRequestInputStream.h"
+#include <WebCore/NetworkStorageSession.h>
+#include <WebCore/NotImplemented.h>
+#include <WebCore/ResourceError.h>
+#include <WebCore/ResourceRequest.h>
+#include <WebCore/ResourceResponse.h>
+#include <WebCore/SoupNetworkSession.h>
+#include <WebCore/WebKitSoupRequestGeneric.h>
+#include <wtf/NeverDestroyed.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+
+LegacyCustomProtocolManager::WebSoupRequestAsyncData::WebSoupRequestAsyncData(GRefPtr<GTask>&& requestTask, WebKitSoupRequestGeneric* requestGeneric)
+ : task(WTFMove(requestTask))
+ , request(requestGeneric)
+ , cancellable(g_task_get_cancellable(task.get()))
+{
+ // If the struct contains a null request, it is because the request failed.
+ g_object_add_weak_pointer(G_OBJECT(request), reinterpret_cast<void**>(&request));
+}
+
+LegacyCustomProtocolManager::WebSoupRequestAsyncData::~WebSoupRequestAsyncData()
+{
+ if (request)
+ g_object_remove_weak_pointer(G_OBJECT(request), reinterpret_cast<void**>(&request));
+}
+
+class CustomProtocolRequestClient final : public WebKitSoupRequestGenericClient {
+public:
+ static CustomProtocolRequestClient& singleton()
+ {
+ static NeverDestroyed<CustomProtocolRequestClient> client;
+ return client;
+ }
+
+private:
+ void startRequest(GRefPtr<GTask>&& task) override
+ {
+ WebKitSoupRequestGeneric* request = WEBKIT_SOUP_REQUEST_GENERIC(g_task_get_source_object(task.get()));
+ auto* customProtocolManager = NetworkProcess::singleton().supplement<LegacyCustomProtocolManager>();
+ if (!customProtocolManager)
+ return;
+
+ auto customProtocolID = customProtocolManager->addCustomProtocol(std::make_unique<LegacyCustomProtocolManager::WebSoupRequestAsyncData>(WTFMove(task), request));
+ customProtocolManager->startLoading(customProtocolID, webkitSoupRequestGenericGetRequest(request));
+ }
+};
+
+void LegacyCustomProtocolManager::registerProtocolClass()
+{
+ static_cast<WebKitSoupRequestGenericClass*>(g_type_class_ref(WEBKIT_TYPE_SOUP_REQUEST_GENERIC))->client = &CustomProtocolRequestClient::singleton();
+ SoupNetworkSession::setCustomProtocolRequestType(WEBKIT_TYPE_SOUP_REQUEST_GENERIC);
+}
+
+void LegacyCustomProtocolManager::registerScheme(const String& scheme)
+{
+ if (!m_registeredSchemes)
+ m_registeredSchemes = adoptGRef(g_ptr_array_new_with_free_func(g_free));
+
+ if (m_registeredSchemes->len)
+ g_ptr_array_remove_index_fast(m_registeredSchemes.get(), m_registeredSchemes->len - 1);
+ g_ptr_array_add(m_registeredSchemes.get(), g_strdup(scheme.utf8().data()));
+ g_ptr_array_add(m_registeredSchemes.get(), nullptr);
+
+ auto* genericRequestClass = static_cast<SoupRequestClass*>(g_type_class_peek(WEBKIT_TYPE_SOUP_REQUEST_GENERIC));
+ ASSERT(genericRequestClass);
+ genericRequestClass->schemes = const_cast<const char**>(reinterpret_cast<char**>(m_registeredSchemes->pdata));
+ NetworkStorageSession::forEach([](const WebCore::NetworkStorageSession& session) {
+ if (auto* soupSession = session.soupNetworkSession())
+ soupSession->setupCustomProtocols();
+ });
+}
+
+void LegacyCustomProtocolManager::unregisterScheme(const String&)
+{
+ notImplemented();
+}
+
+bool LegacyCustomProtocolManager::supportsScheme(const String& scheme)
+{
+ if (scheme.isNull())
+ return false;
+
+ CString cScheme = scheme.utf8();
+ for (unsigned i = 0; i < m_registeredSchemes->len; ++i) {
+ if (cScheme == static_cast<char*>(g_ptr_array_index(m_registeredSchemes.get(), i)))
+ return true;
+ }
+
+ return false;
+}
+
+void LegacyCustomProtocolManager::didFailWithError(uint64_t customProtocolID, const ResourceError& error)
+{
+ auto* data = m_customProtocolMap.get(customProtocolID);
+ ASSERT(data);
+
+ // Either we haven't started reading the stream yet, in which case we need to complete the
+ // task first, or we failed reading it and the task was already completed by didLoadData().
+ ASSERT(!data->stream || !data->task);
+
+ if (!data->stream) {
+ GRefPtr<GTask> task = std::exchange(data->task, nullptr);
+ ASSERT(task.get());
+ g_task_return_new_error(task.get(), g_quark_from_string(error.domain().utf8().data()),
+ error.errorCode(), "%s", error.localizedDescription().utf8().data());
+ } else
+ webkitSoupRequestInputStreamDidFailWithError(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get()), error);
+
+ removeCustomProtocol(customProtocolID);
+}
+
+void LegacyCustomProtocolManager::didLoadData(uint64_t customProtocolID, const IPC::DataReference& dataReference)
+{
+ auto* data = m_customProtocolMap.get(customProtocolID);
+ // The data might have been removed from the request map if a previous chunk failed
+ // and a new message was sent by the UI process before being notified about the failure.
+ if (!data)
+ return;
+
+ if (!data->stream) {
+ GRefPtr<GTask> task = std::exchange(data->task, nullptr);
+ ASSERT(task.get());
+
+ goffset soupContentLength = soup_request_get_content_length(SOUP_REQUEST(g_task_get_source_object(task.get())));
+ uint64_t contentLength = soupContentLength == -1 ? 0 : static_cast<uint64_t>(soupContentLength);
+ if (!dataReference.size()) {
+ // Empty reply, just create and empty GMemoryInputStream.
+ data->stream = g_memory_input_stream_new();
+ } else if (dataReference.size() == contentLength) {
+ // We don't expect more data, so we can just create a GMemoryInputStream with all the data.
+ data->stream = g_memory_input_stream_new_from_data(g_memdup(dataReference.data(), dataReference.size()), contentLength, g_free);
+ } else {
+ // We expect more data chunks from the UI process.
+ data->stream = webkitSoupRequestInputStreamNew(contentLength);
+ webkitSoupRequestInputStreamAddData(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get()), dataReference.data(), dataReference.size());
+ }
+ g_task_return_pointer(task.get(), data->stream.get(), g_object_unref);
+ return;
+ }
+
+ if (g_cancellable_is_cancelled(data->cancellable.get()) || !data->request) {
+ // ResourceRequest failed or it was cancelled. It doesn't matter here the error or if it was cancelled,
+ // because that's already handled by the resource handle client, we just want to notify the UI process
+ // to stop reading data from the user input stream. If UI process already sent all the data we simply
+ // finish silently.
+ if (!webkitSoupRequestInputStreamFinished(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get())))
+ stopLoading(customProtocolID);
+
+ return;
+ }
+
+ webkitSoupRequestInputStreamAddData(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get()), dataReference.data(), dataReference.size());
+}
+
+void LegacyCustomProtocolManager::didReceiveResponse(uint64_t customProtocolID, const ResourceResponse& response, uint32_t)
+{
+ auto* data = m_customProtocolMap.get(customProtocolID);
+ // The data might have been removed from the request map if an error happened even before this point.
+ if (!data)
+ return;
+
+ ASSERT(data->task);
+
+ WebKitSoupRequestGeneric* request = WEBKIT_SOUP_REQUEST_GENERIC(g_task_get_source_object(data->task.get()));
+ webkitSoupRequestGenericSetContentLength(request, response.expectedContentLength() ? response.expectedContentLength() : -1);
+ webkitSoupRequestGenericSetContentType(request, !response.mimeType().isEmpty() ? response.mimeType().utf8().data() : 0);
+}
+
+void LegacyCustomProtocolManager::didFinishLoading(uint64_t customProtocolID)
+{
+ ASSERT(m_customProtocolMap.contains(customProtocolID));
+ removeCustomProtocol(customProtocolID);
+}
+
+void LegacyCustomProtocolManager::wasRedirectedToRequest(uint64_t, const ResourceRequest&, const ResourceResponse&)
+{
+ notImplemented();
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -30,9 +30,9 @@
</span><span class="cx"> #include "Attachment.h"
</span><span class="cx"> #include "AuthenticationManager.h"
</span><span class="cx"> #include "ChildProcessMessages.h"
</span><del>-#include "CustomProtocolManager.h"
</del><span class="cx"> #include "DataReference.h"
</span><span class="cx"> #include "DownloadProxyMessages.h"
</span><ins>+#include "LegacyCustomProtocolManager.h"
</ins><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "NetworkConnectionToWebProcess.h"
</span><span class="cx"> #include "NetworkProcessCreationParameters.h"
</span><span class="lines">@@ -109,9 +109,9 @@
</span><span class="cx">
</span><span class="cx"> addSupplement<AuthenticationManager>();
</span><span class="cx"> addSupplement<WebCookieManager>();
</span><del>- addSupplement<CustomProtocolManager>();
</del><ins>+ addSupplement<LegacyCustomProtocolManager>();
</ins><span class="cx"> #if USE(NETWORK_SESSION) && PLATFORM(COCOA)
</span><del>- NetworkSessionCocoa::setCustomProtocolManager(supplement<CustomProtocolManager>());
</del><ins>+ NetworkSessionCocoa::setLegacyCustomProtocolManager(supplement<LegacyCustomProtocolManager>());
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkSessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkSession.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkSession.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkSession.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-Ref<NetworkSession> NetworkSession::create(SessionID sessionID, CustomProtocolManager* customProtocolManager)
</del><ins>+Ref<NetworkSession> NetworkSession::create(SessionID sessionID, LegacyCustomProtocolManager* customProtocolManager)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> return NetworkSessionCocoa::create(sessionID, customProtocolManager);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkSessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkSession.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkSession.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkSession.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -38,12 +38,12 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class CustomProtocolManager;
</del><ins>+class LegacyCustomProtocolManager;
</ins><span class="cx"> class NetworkDataTask;
</span><span class="cx">
</span><span class="cx"> class NetworkSession : public RefCounted<NetworkSession> {
</span><span class="cx"> public:
</span><del>- static Ref<NetworkSession> create(WebCore::SessionID, CustomProtocolManager* = nullptr);
</del><ins>+ static Ref<NetworkSession> create(WebCore::SessionID, LegacyCustomProtocolManager* = nullptr);
</ins><span class="cx"> static NetworkSession& defaultSession();
</span><span class="cx"> virtual ~NetworkSession();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscocoaNetworkSessionCocoah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -42,12 +42,12 @@
</span><span class="cx"> class NetworkSessionCocoa final : public NetworkSession {
</span><span class="cx"> friend class NetworkDataTaskCocoa;
</span><span class="cx"> public:
</span><del>- static Ref<NetworkSession> create(WebCore::SessionID, CustomProtocolManager*);
</del><ins>+ static Ref<NetworkSession> create(WebCore::SessionID, LegacyCustomProtocolManager*);
</ins><span class="cx"> static NetworkSession& defaultSession();
</span><span class="cx"> ~NetworkSessionCocoa();
</span><span class="cx">
</span><span class="cx"> // Must be called before any NetworkSession has been created.
</span><del>- static void setCustomProtocolManager(CustomProtocolManager*);
</del><ins>+ static void setLegacyCustomProtocolManager(LegacyCustomProtocolManager*);
</ins><span class="cx"> static void setSourceApplicationAuditTokenData(RetainPtr<CFDataRef>&&);
</span><span class="cx"> static void setSourceApplicationBundleIdentifier(const String&);
</span><span class="cx"> static void setSourceApplicationSecondaryIdentifier(const String&);
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> DownloadID takeDownloadID(NetworkDataTaskCocoa::TaskIdentifier);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- NetworkSessionCocoa(WebCore::SessionID, CustomProtocolManager*);
</del><ins>+ NetworkSessionCocoa(WebCore::SessionID, LegacyCustomProtocolManager*);
</ins><span class="cx">
</span><span class="cx"> void invalidateAndCancel() override;
</span><span class="cx"> void clearCredentials() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesscocoaNetworkSessionCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -29,9 +29,9 @@
</span><span class="cx"> #if USE(NETWORK_SESSION)
</span><span class="cx">
</span><span class="cx"> #import "AuthenticationManager.h"
</span><del>-#import "CustomProtocolManager.h"
</del><span class="cx"> #import "DataReference.h"
</span><span class="cx"> #import "Download.h"
</span><ins>+#import "LegacyCustomProtocolManager.h"
</ins><span class="cx"> #import "Logging.h"
</span><span class="cx"> #import "NetworkCache.h"
</span><span class="cx"> #import "NetworkLoad.h"
</span><span class="lines">@@ -407,9 +407,9 @@
</span><span class="cx"> return [NSURLSessionConfiguration defaultSessionConfiguration];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static CustomProtocolManager*& globalCustomProtocolManager()
</del><ins>+static LegacyCustomProtocolManager*& globalLegacyCustomProtocolManager()
</ins><span class="cx"> {
</span><del>- static CustomProtocolManager* customProtocolManager { nullptr };
</del><ins>+ static LegacyCustomProtocolManager* customProtocolManager { nullptr };
</ins><span class="cx"> return customProtocolManager;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -443,10 +443,10 @@
</span><span class="cx"> static bool sessionsCreated = false;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void NetworkSessionCocoa::setCustomProtocolManager(CustomProtocolManager* customProtocolManager)
</del><ins>+void NetworkSessionCocoa::setLegacyCustomProtocolManager(LegacyCustomProtocolManager* customProtocolManager)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!sessionsCreated);
</span><del>- globalCustomProtocolManager() = customProtocolManager;
</del><ins>+ globalLegacyCustomProtocolManager() = customProtocolManager;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void NetworkSessionCocoa::setSourceApplicationAuditTokenData(RetainPtr<CFDataRef>&& data)
</span><span class="lines">@@ -475,7 +475,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-Ref<NetworkSession> NetworkSessionCocoa::create(WebCore::SessionID sessionID, CustomProtocolManager* customProtocolManager)
</del><ins>+Ref<NetworkSession> NetworkSessionCocoa::create(WebCore::SessionID sessionID, LegacyCustomProtocolManager* customProtocolManager)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new NetworkSessionCocoa(sessionID, customProtocolManager));
</span><span class="cx"> }
</span><span class="lines">@@ -483,11 +483,11 @@
</span><span class="cx"> NetworkSession& NetworkSessionCocoa::defaultSession()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><del>- static NetworkSession* session = &NetworkSessionCocoa::create(WebCore::SessionID::defaultSessionID(), globalCustomProtocolManager()).leakRef();
</del><ins>+ static NetworkSession* session = &NetworkSessionCocoa::create(WebCore::SessionID::defaultSessionID(), globalLegacyCustomProtocolManager()).leakRef();
</ins><span class="cx"> return *session;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-NetworkSessionCocoa::NetworkSessionCocoa(WebCore::SessionID sessionID, CustomProtocolManager* customProtocolManager)
</del><ins>+NetworkSessionCocoa::NetworkSessionCocoa(WebCore::SessionID sessionID, LegacyCustomProtocolManager* customProtocolManager)
</ins><span class="cx"> : NetworkSession(sessionID)
</span><span class="cx"> {
</span><span class="cx"> relaxAdoptionRequirement();
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessmacRemoteNetworkingContextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "RemoteNetworkingContext.h"
</span><span class="cx">
</span><del>-#import "CustomProtocolManager.h"
</del><ins>+#import "LegacyCustomProtocolManager.h"
</ins><span class="cx"> #import "NetworkProcess.h"
</span><span class="cx"> #import "NetworkSession.h"
</span><span class="cx"> #import "SessionTracker.h"
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> NetworkStorageSession::ensurePrivateBrowsingSession(sessionID, base + '.' + String::number(sessionID.sessionID()));
</span><span class="cx">
</span><span class="cx"> #if USE(NETWORK_SESSION)
</span><del>- auto networkSession = NetworkSession::create(sessionID, NetworkProcess::singleton().supplement<CustomProtocolManager>());
</del><ins>+ auto networkSession = NetworkSession::create(sessionID, NetworkProcess::singleton().supplement<LegacyCustomProtocolManager>());
</ins><span class="cx"> SessionTracker::setSession(sessionID, WTFMove(networkSession));
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> list(APPEND WebKit2_SOURCES
</span><span class="cx"> DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp
</span><span class="cx">
</span><del>- NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp
</del><ins>+ NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp
</ins><span class="cx">
</span><span class="cx"> NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPICustomProtocolManagerClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><del>-class CustomProtocolManagerProxy;
</del><ins>+class LegacyCustomProtocolManagerProxy;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -41,10 +41,10 @@
</span><span class="cx"> public:
</span><span class="cx"> virtual ~CustomProtocolManagerClient() { }
</span><span class="cx">
</span><del>- virtual void startLoading(WebKit::CustomProtocolManagerProxy&, uint64_t /* customProtocolID */, const WebCore::ResourceRequest&) { }
- virtual void stopLoading(WebKit::CustomProtocolManagerProxy&, uint64_t /* customProtocolID */) { }
</del><ins>+ virtual void startLoading(WebKit::LegacyCustomProtocolManagerProxy&, uint64_t /* customProtocolID */, const WebCore::ResourceRequest&) { }
+ virtual void stopLoading(WebKit::LegacyCustomProtocolManagerProxy&, uint64_t /* customProtocolID */) { }
</ins><span class="cx">
</span><del>- virtual void invalidate(WebKit::CustomProtocolManagerProxy&) { }
</del><ins>+ virtual void invalidate(WebKit::LegacyCustomProtocolManagerProxy&) { }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace API
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitCustomProtocolManagerClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> #include "WebKitCustomProtocolManagerClient.h"
</span><span class="cx">
</span><span class="cx"> #include "APICustomProtocolManagerClient.h"
</span><del>-#include "CustomProtocolManagerProxy.h"
</del><ins>+#include "LegacyCustomProtocolManagerProxy.h"
</ins><span class="cx"> #include "WebKitWebContextPrivate.h"
</span><span class="cx"> #include "WebProcessPool.h"
</span><span class="cx">
</span><span class="lines">@@ -36,17 +36,17 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- void startLoading(CustomProtocolManagerProxy& manager, uint64_t customProtocolID, const ResourceRequest& request) override
</del><ins>+ void startLoading(LegacyCustomProtocolManagerProxy& manager, uint64_t customProtocolID, const ResourceRequest& request) override
</ins><span class="cx"> {
</span><span class="cx"> webkitWebContextStartLoadingCustomProtocol(m_webContext, customProtocolID, request, manager);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void stopLoading(CustomProtocolManagerProxy&, uint64_t customProtocolID) override
</del><ins>+ void stopLoading(LegacyCustomProtocolManagerProxy&, uint64_t customProtocolID) override
</ins><span class="cx"> {
</span><span class="cx"> webkitWebContextStopLoadingCustomProtocol(m_webContext, customProtocolID);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void invalidate(CustomProtocolManagerProxy& manager) override
</del><ins>+ void invalidate(LegacyCustomProtocolManagerProxy& manager) override
</ins><span class="cx"> {
</span><span class="cx"> webkitWebContextInvalidateCustomProtocolRequests(m_webContext, manager);
</span><span class="cx"> }
</span><span class="lines">@@ -56,5 +56,5 @@
</span><span class="cx">
</span><span class="cx"> void attachCustomProtocolManagerClientToContext(WebKitWebContext* webContext)
</span><span class="cx"> {
</span><del>- webkitWebContextGetProcessPool(webContext).setCustomProtocolManagerClient(std::make_unique<CustomProtocolManagerClient>(webContext));
</del><ins>+ webkitWebContextGetProcessPool(webContext).setLegacyCustomProtocolManagerClient(std::make_unique<CustomProtocolManagerClient>(webContext));
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitURISchemeRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">
</span><span class="cx"> struct _WebKitURISchemeRequestPrivate {
</span><span class="cx"> WebKitWebContext* webContext;
</span><del>- CustomProtocolManagerProxy* manager;
</del><ins>+ LegacyCustomProtocolManagerProxy* manager;
</ins><span class="cx"> RefPtr<WebPageProxy> initiatingPage;
</span><span class="cx"> uint64_t requestID;
</span><span class="cx"> CString uri;
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebKitURISchemeRequest* webkitURISchemeRequestCreate(uint64_t requestID, WebKitWebContext* webContext, const ResourceRequest& resourceRequest, CustomProtocolManagerProxy& manager)
</del><ins>+WebKitURISchemeRequest* webkitURISchemeRequestCreate(uint64_t requestID, WebKitWebContext* webContext, const ResourceRequest& resourceRequest, LegacyCustomProtocolManagerProxy& manager)
</ins><span class="cx"> {
</span><span class="cx"> WebKitURISchemeRequest* request = WEBKIT_URI_SCHEME_REQUEST(g_object_new(WEBKIT_TYPE_URI_SCHEME_REQUEST, nullptr));
</span><span class="cx"> request->priv->webContext = webContext;
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> g_cancellable_cancel(request->priv->cancellable.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CustomProtocolManagerProxy* webkitURISchemeRequestGetManager(WebKitURISchemeRequest* request)
</del><ins>+LegacyCustomProtocolManagerProxy* webkitURISchemeRequestGetManager(WebKitURISchemeRequest* request)
</ins><span class="cx"> {
</span><span class="cx"> return request->priv->manager;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitURISchemeRequestPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -20,15 +20,15 @@
</span><span class="cx"> #ifndef WebKitURISchemeRequestPrivate_h
</span><span class="cx"> #define WebKitURISchemeRequestPrivate_h
</span><span class="cx">
</span><del>-#include "CustomProtocolManagerProxy.h"
</del><ins>+#include "LegacyCustomProtocolManagerProxy.h"
</ins><span class="cx"> #include "WebKitPrivate.h"
</span><span class="cx"> #include "WebKitURISchemeRequest.h"
</span><span class="cx"> #include "WebKitWebContext.h"
</span><span class="cx"> #include <WebCore/ResourceRequest.h>
</span><span class="cx">
</span><del>-WebKitURISchemeRequest* webkitURISchemeRequestCreate(uint64_t requestID, WebKitWebContext*, const WebCore::ResourceRequest&, WebKit::CustomProtocolManagerProxy&);
</del><ins>+WebKitURISchemeRequest* webkitURISchemeRequestCreate(uint64_t requestID, WebKitWebContext*, const WebCore::ResourceRequest&, WebKit::LegacyCustomProtocolManagerProxy&);
</ins><span class="cx"> void webkitURISchemeRequestCancel(WebKitURISchemeRequest*);
</span><del>-WebKit::CustomProtocolManagerProxy* webkitURISchemeRequestGetManager(WebKitURISchemeRequest*);
</del><ins>+WebKit::LegacyCustomProtocolManagerProxy* webkitURISchemeRequestGetManager(WebKitURISchemeRequest*);
</ins><span class="cx"> void webkitURISchemeRequestInvalidate(WebKitURISchemeRequest*);
</span><span class="cx">
</span><span class="cx"> #endif // WebKitURISchemeRequestPrivate_h
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx"> priv->clientsDetached = true;
</span><span class="cx"> priv->processPool->initializeInjectedBundleClient(nullptr);
</span><span class="cx"> priv->processPool->setDownloadClient(nullptr);
</span><del>- priv->processPool->setCustomProtocolManagerClient(nullptr);
</del><ins>+ priv->processPool->setLegacyCustomProtocolManagerClient(nullptr);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (priv->websiteDataManager) {
</span><span class="lines">@@ -1440,7 +1440,7 @@
</span><span class="cx"> return *context->priv->processPool;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void webkitWebContextStartLoadingCustomProtocol(WebKitWebContext* context, uint64_t customProtocolID, const WebCore::ResourceRequest& resourceRequest, CustomProtocolManagerProxy& manager)
</del><ins>+void webkitWebContextStartLoadingCustomProtocol(WebKitWebContext* context, uint64_t customProtocolID, const WebCore::ResourceRequest& resourceRequest, LegacyCustomProtocolManagerProxy& manager)
</ins><span class="cx"> {
</span><span class="cx"> GRefPtr<WebKitURISchemeRequest> request = adoptGRef(webkitURISchemeRequestCreate(customProtocolID, context, resourceRequest, manager));
</span><span class="cx"> String scheme(String::fromUTF8(webkit_uri_scheme_request_get_scheme(request.get())));
</span><span class="lines">@@ -1461,7 +1461,7 @@
</span><span class="cx"> webkitURISchemeRequestCancel(request.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void webkitWebContextInvalidateCustomProtocolRequests(WebKitWebContext* context, CustomProtocolManagerProxy& manager)
</del><ins>+void webkitWebContextInvalidateCustomProtocolRequests(WebKitWebContext* context, LegacyCustomProtocolManagerProxy& manager)
</ins><span class="cx"> {
</span><span class="cx"> Vector<GRefPtr<WebKitURISchemeRequest>> requests;
</span><span class="cx"> copyValuesToVector(context->priv->uriSchemeRequests, requests);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx"> #ifndef WebKitWebContextPrivate_h
</span><span class="cx"> #define WebKitWebContextPrivate_h
</span><span class="cx">
</span><del>-#include "CustomProtocolManagerProxy.h"
</del><span class="cx"> #include "DownloadProxy.h"
</span><ins>+#include "LegacyCustomProtocolManagerProxy.h"
</ins><span class="cx"> #include "WebKitPrivate.h"
</span><span class="cx"> #include "WebKitUserContentManager.h"
</span><span class="cx"> #include "WebKitWebContext.h"
</span><span class="lines">@@ -39,9 +39,9 @@
</span><span class="cx"> WebKitDownload* webkitWebContextStartDownload(WebKitWebContext*, const char* uri, WebKit::WebPageProxy*);
</span><span class="cx"> void webkitWebContextRemoveDownload(WebKit::DownloadProxy*);
</span><span class="cx"> void webkitWebContextDownloadStarted(WebKitWebContext*, WebKitDownload*);
</span><del>-void webkitWebContextStartLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID, const WebCore::ResourceRequest&, WebKit::CustomProtocolManagerProxy&);
</del><ins>+void webkitWebContextStartLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID, const WebCore::ResourceRequest&, WebKit::LegacyCustomProtocolManagerProxy&);
</ins><span class="cx"> void webkitWebContextStopLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID);
</span><del>-void webkitWebContextInvalidateCustomProtocolRequests(WebKitWebContext*, WebKit::CustomProtocolManagerProxy&);
</del><ins>+void webkitWebContextInvalidateCustomProtocolRequests(WebKitWebContext*, WebKit::LegacyCustomProtocolManagerProxy&);
</ins><span class="cx"> void webkitWebContextDidFinishLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID);
</span><span class="cx"> bool webkitWebContextIsLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID);
</span><span class="cx"> void webkitWebContextCreatePageForWebView(WebKitWebContext*, WebKitWebView*, WebKitUserContentManager*, WebKitWebView*);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaCustomProtocolManagerClienth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,52 +0,0 @@
</span><del>-/*
- * Copyright (C) 2017 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#import "APICustomProtocolManagerClient.h"
-#import <wtf/HashMap.h>
-#import <wtf/RetainPtr.h>
-
-OBJC_CLASS WKCustomProtocolLoader;
-
-namespace WebCore {
-class ResourceRequest;
-}
-
-namespace WebKit {
-
-class CustomProtocolManagerProxy;
-
-class CustomProtocolManagerClient final : public API::CustomProtocolManagerClient {
-private:
- void startLoading(CustomProtocolManagerProxy&, uint64_t /*customProtocolID*/, const WebCore::ResourceRequest&) final;
- void stopLoading(CustomProtocolManagerProxy&, uint64_t /*customProtocolID*/) final;
- void invalidate(CustomProtocolManagerProxy&) final;
-
- HashMap<uint64_t, RetainPtr<WKCustomProtocolLoader>> m_loaderMap;
-};
-
-} // namespace WebKit
-
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaCustomProtocolManagerClientmm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.mm (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.mm        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.mm        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,155 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "CustomProtocolManagerClient.h"
-
-#import "CustomProtocolManagerProxy.h"
-#import "DataReference.h"
-#import <WebCore/ResourceError.h>
-#import <WebCore/ResourceRequest.h>
-#import <WebCore/ResourceResponse.h>
-
-using namespace WebCore;
-using namespace WebKit;
-
-@interface WKCustomProtocolLoader : NSObject <NSURLConnectionDelegate> {
-@private
- CustomProtocolManagerProxy* _customProtocolManagerProxy;
- uint64_t _customProtocolID;
- NSURLCacheStoragePolicy _storagePolicy;
- NSURLConnection *_urlConnection;
-}
-- (id)initWithCustomProtocolManagerProxy:(CustomProtocolManagerProxy*)customProtocolManagerProxy customProtocolID:(uint64_t)customProtocolID request:(NSURLRequest *)request;
-- (void)customProtocolManagerProxyDestroyed;
-@end
-
-@implementation WKCustomProtocolLoader
-
-- (id)initWithCustomProtocolManagerProxy:(CustomProtocolManagerProxy*)customProtocolManagerProxy customProtocolID:(uint64_t)customProtocolID request:(NSURLRequest *)request
-{
- self = [super init];
- if (!self)
- return nil;
-
- ASSERT(customProtocolManagerProxy);
- ASSERT(request);
- _customProtocolManagerProxy = customProtocolManagerProxy;
- _customProtocolID = customProtocolID;
- _storagePolicy = NSURLCacheStorageNotAllowed;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- _urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO];
- [_urlConnection scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
- [_urlConnection start];
-#pragma clang diagnostic pop
-
- return self;
-}
-
-- (void)dealloc
-{
- [_urlConnection cancel];
- [_urlConnection release];
- [super dealloc];
-}
-
-- (void)customProtocolManagerProxyDestroyed
-{
- ASSERT(_customProtocolManagerProxy);
- _customProtocolManagerProxy = nullptr;
- [_urlConnection cancel];
-}
-
-- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
-{
- ResourceError coreError(error);
- _customProtocolManagerProxy->didFailWithError(_customProtocolID, coreError);
- _customProtocolManagerProxy->stopLoading(_customProtocolID);
-}
-
-- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse
-{
- ASSERT(_storagePolicy == NSURLCacheStorageNotAllowed);
- _storagePolicy = [cachedResponse storagePolicy];
- return cachedResponse;
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
-{
- ResourceResponse coreResponse(response);
- _customProtocolManagerProxy->didReceiveResponse(_customProtocolID, coreResponse, _storagePolicy);
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
-{
- IPC::DataReference coreData(static_cast<const uint8_t*>([data bytes]), [data length]);
- _customProtocolManagerProxy->didLoadData(_customProtocolID, coreData);
-}
-
-- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
-{
- if (redirectResponse) {
- _customProtocolManagerProxy->wasRedirectedToRequest(_customProtocolID, request, redirectResponse);
- return nil;
- }
- return request;
-}
-
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
-{
- _customProtocolManagerProxy->didFinishLoading(_customProtocolID);
- _customProtocolManagerProxy->stopLoading(_customProtocolID);
-}
-
-@end
-
-namespace WebKit {
-
-void CustomProtocolManagerClient::startLoading(CustomProtocolManagerProxy& manager, uint64_t customProtocolID, const ResourceRequest& coreRequest)
-{
- NSURLRequest *request = coreRequest.nsURLRequest(DoNotUpdateHTTPBody);
- if (!request)
- return;
-
- WKCustomProtocolLoader *loader = [[WKCustomProtocolLoader alloc] initWithCustomProtocolManagerProxy:&manager customProtocolID:customProtocolID request:request];
- ASSERT(loader);
- ASSERT(!m_loaderMap.contains(customProtocolID));
- m_loaderMap.add(customProtocolID, loader);
- [loader release];
-}
-
-void CustomProtocolManagerClient::stopLoading(CustomProtocolManagerProxy&, uint64_t customProtocolID)
-{
- m_loaderMap.remove(customProtocolID);
-}
-
-void CustomProtocolManagerClient::invalidate(CustomProtocolManagerProxy&)
-{
- for (auto& loader : m_loaderMap)
- [loader.value customProtocolManagerProxyDestroyed];
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaLegacyCustomProtocolManagerClienthfromrev213440trunkSourceWebKit2UIProcessCocoaCustomProtocolManagerClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.h (from rev 213440, trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.h) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#import "APICustomProtocolManagerClient.h"
+#import <wtf/HashMap.h>
+#import <wtf/RetainPtr.h>
+
+OBJC_CLASS WKCustomProtocolLoader;
+
+namespace WebCore {
+class ResourceRequest;
+}
+
+namespace WebKit {
+
+class LegacyCustomProtocolManagerProxy;
+
+class LegacyCustomProtocolManagerClient final : public API::CustomProtocolManagerClient {
+private:
+ void startLoading(LegacyCustomProtocolManagerProxy&, uint64_t /*customProtocolID*/, const WebCore::ResourceRequest&) final;
+ void stopLoading(LegacyCustomProtocolManagerProxy&, uint64_t /*customProtocolID*/) final;
+ void invalidate(LegacyCustomProtocolManagerProxy&) final;
+
+ HashMap<uint64_t, RetainPtr<WKCustomProtocolLoader>> m_loaderMap;
+};
+
+} // namespace WebKit
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaLegacyCustomProtocolManagerClientmmfromrev213440trunkSourceWebKit2UIProcessCocoaCustomProtocolManagerClientmm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm (from rev 213440, trunk/Source/WebKit2/UIProcess/Cocoa/CustomProtocolManagerClient.mm) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,155 @@
</span><ins>+/*
+ * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "LegacyCustomProtocolManagerClient.h"
+
+#import "DataReference.h"
+#import "LegacyCustomProtocolManagerProxy.h"
+#import <WebCore/ResourceError.h>
+#import <WebCore/ResourceRequest.h>
+#import <WebCore/ResourceResponse.h>
+
+using namespace WebCore;
+using namespace WebKit;
+
+@interface WKCustomProtocolLoader : NSObject <NSURLConnectionDelegate> {
+@private
+ LegacyCustomProtocolManagerProxy* _customProtocolManagerProxy;
+ uint64_t _customProtocolID;
+ NSURLCacheStoragePolicy _storagePolicy;
+ NSURLConnection *_urlConnection;
+}
+- (id)initWithLegacyCustomProtocolManagerProxy:(LegacyCustomProtocolManagerProxy*)customProtocolManagerProxy customProtocolID:(uint64_t)customProtocolID request:(NSURLRequest *)request;
+- (void)customProtocolManagerProxyDestroyed;
+@end
+
+@implementation WKCustomProtocolLoader
+
+- (id)initWithLegacyCustomProtocolManagerProxy:(LegacyCustomProtocolManagerProxy*)customProtocolManagerProxy customProtocolID:(uint64_t)customProtocolID request:(NSURLRequest *)request
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ ASSERT(customProtocolManagerProxy);
+ ASSERT(request);
+ _customProtocolManagerProxy = customProtocolManagerProxy;
+ _customProtocolID = customProtocolID;
+ _storagePolicy = NSURLCacheStorageNotAllowed;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ _urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO];
+ [_urlConnection scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
+ [_urlConnection start];
+#pragma clang diagnostic pop
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [_urlConnection cancel];
+ [_urlConnection release];
+ [super dealloc];
+}
+
+- (void)customProtocolManagerProxyDestroyed
+{
+ ASSERT(_customProtocolManagerProxy);
+ _customProtocolManagerProxy = nullptr;
+ [_urlConnection cancel];
+}
+
+- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
+{
+ ResourceError coreError(error);
+ _customProtocolManagerProxy->didFailWithError(_customProtocolID, coreError);
+ _customProtocolManagerProxy->stopLoading(_customProtocolID);
+}
+
+- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse
+{
+ ASSERT(_storagePolicy == NSURLCacheStorageNotAllowed);
+ _storagePolicy = [cachedResponse storagePolicy];
+ return cachedResponse;
+}
+
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
+{
+ ResourceResponse coreResponse(response);
+ _customProtocolManagerProxy->didReceiveResponse(_customProtocolID, coreResponse, _storagePolicy);
+}
+
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
+{
+ IPC::DataReference coreData(static_cast<const uint8_t*>([data bytes]), [data length]);
+ _customProtocolManagerProxy->didLoadData(_customProtocolID, coreData);
+}
+
+- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
+{
+ if (redirectResponse) {
+ _customProtocolManagerProxy->wasRedirectedToRequest(_customProtocolID, request, redirectResponse);
+ return nil;
+ }
+ return request;
+}
+
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+{
+ _customProtocolManagerProxy->didFinishLoading(_customProtocolID);
+ _customProtocolManagerProxy->stopLoading(_customProtocolID);
+}
+
+@end
+
+namespace WebKit {
+
+void LegacyCustomProtocolManagerClient::startLoading(LegacyCustomProtocolManagerProxy& manager, uint64_t customProtocolID, const ResourceRequest& coreRequest)
+{
+ NSURLRequest *request = coreRequest.nsURLRequest(DoNotUpdateHTTPBody);
+ if (!request)
+ return;
+
+ WKCustomProtocolLoader *loader = [[WKCustomProtocolLoader alloc] initWithLegacyCustomProtocolManagerProxy:&manager customProtocolID:customProtocolID request:request];
+ ASSERT(loader);
+ ASSERT(!m_loaderMap.contains(customProtocolID));
+ m_loaderMap.add(customProtocolID, loader);
+ [loader release];
+}
+
+void LegacyCustomProtocolManagerClient::stopLoading(LegacyCustomProtocolManagerProxy&, uint64_t customProtocolID)
+{
+ m_loaderMap.remove(customProtocolID);
+}
+
+void LegacyCustomProtocolManagerClient::invalidate(LegacyCustomProtocolManagerProxy&)
+{
+ for (auto& loader : m_loaderMap)
+ [loader.value customProtocolManagerProxyDestroyed];
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebProcessPoolCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "WebProcessPool.h"
</span><span class="cx">
</span><del>-#import "CustomProtocolManagerClient.h"
</del><ins>+#import "LegacyCustomProtocolManagerClient.h"
</ins><span class="cx"> #import "NetworkProcessCreationParameters.h"
</span><span class="cx"> #import "NetworkProcessMessages.h"
</span><span class="cx"> #import "NetworkProcessProxy.h"
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx"> WebKit::WebMemoryPressureHandler::singleton();
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- setCustomProtocolManagerClient(std::make_unique<CustomProtocolManagerClient>());
</del><ins>+ setLegacyCustomProtocolManagerClient(std::make_unique<LegacyCustomProtocolManagerClient>());
</ins><span class="cx">
</span><span class="cx"> if (m_websiteDataStore)
</span><span class="cx"> m_websiteDataStore->registerSharedResourceLoadObserver();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxycpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,86 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "CustomProtocolManagerProxy.h"
-
-#include "APICustomProtocolManagerClient.h"
-#include "ChildProcessProxy.h"
-#include "CustomProtocolManagerMessages.h"
-#include "CustomProtocolManagerProxyMessages.h"
-#include "WebProcessPool.h"
-#include <WebCore/ResourceRequest.h>
-
-namespace WebKit {
-
-CustomProtocolManagerProxy::CustomProtocolManagerProxy(ChildProcessProxy* childProcessProxy, WebProcessPool& processPool)
- : m_childProcessProxy(childProcessProxy)
- , m_processPool(processPool)
-{
- ASSERT(m_childProcessProxy);
- m_childProcessProxy->addMessageReceiver(Messages::CustomProtocolManagerProxy::messageReceiverName(), *this);
-}
-
-CustomProtocolManagerProxy::~CustomProtocolManagerProxy()
-{
- m_childProcessProxy->removeMessageReceiver(Messages::CustomProtocolManagerProxy::messageReceiverName());
-}
-
-void CustomProtocolManagerProxy::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest& request)
-{
- m_processPool.customProtocolManagerClient().startLoading(*this, customProtocolID, request);
-}
-
-void CustomProtocolManagerProxy::stopLoading(uint64_t customProtocolID)
-{
- m_processPool.customProtocolManagerClient().stopLoading(*this, customProtocolID);
-}
-
-void CustomProtocolManagerProxy::processDidClose()
-{
- m_processPool.customProtocolManagerClient().invalidate(*this);
-}
-
-void CustomProtocolManagerProxy::wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse)
-{
- m_childProcessProxy->send(Messages::CustomProtocolManager::WasRedirectedToRequest(customProtocolID, request, redirectResponse), 0);
-}
-
-void CustomProtocolManagerProxy::didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse& response, uint32_t cacheStoragePolicy)
-{
- m_childProcessProxy->send(Messages::CustomProtocolManager::DidReceiveResponse(customProtocolID, response, cacheStoragePolicy), 0);
-}
-
-void CustomProtocolManagerProxy::didLoadData(uint64_t customProtocolID, const IPC::DataReference& data)
-{
- m_childProcessProxy->send(Messages::CustomProtocolManager::DidLoadData(customProtocolID, data), 0);
-}
-
-void CustomProtocolManagerProxy::didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError& error)
-{
- m_childProcessProxy->send(Messages::CustomProtocolManager::DidFailWithError(customProtocolID, error), 0);
-}
-
-void CustomProtocolManagerProxy::didFinishLoading(uint64_t customProtocolID)
-{
- m_childProcessProxy->send(Messages::CustomProtocolManager::DidFinishLoading(customProtocolID), 0);
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxyh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,83 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CustomProtocolManagerProxy_h
-#define CustomProtocolManagerProxy_h
-
-#include "MessageReceiver.h"
-
-#if PLATFORM(COCOA)
-#include <wtf/HashMap.h>
-#include <wtf/RetainPtr.h>
-OBJC_CLASS WKCustomProtocolLoader;
-#endif
-
-namespace IPC {
-class DataReference;
-}
-
-namespace WebCore {
-class ResourceError;
-class ResourceRequest;
-class ResourceResponse;
-} // namespace WebCore
-
-namespace WebKit {
-
-class ChildProcessProxy;
-class WebProcessPool;
-
-class CustomProtocolManagerProxy : public IPC::MessageReceiver {
-public:
- CustomProtocolManagerProxy(ChildProcessProxy*, WebProcessPool&);
- ~CustomProtocolManagerProxy();
-
- void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&);
- void stopLoading(uint64_t customProtocolID);
-
- void processDidClose();
-
- void wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
- void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&, uint32_t cacheStoragePolicy);
- void didLoadData(uint64_t customProtocolID, const IPC::DataReference&);
- void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&);
- void didFinishLoading(uint64_t customProtocolID);
-
-private:
- // IPC::MessageReceiver
- void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
-
- ChildProcessProxy* m_childProcessProxy;
- WebProcessPool& m_processPool;
-
-#if PLATFORM(COCOA)
- typedef HashMap<uint64_t, RetainPtr<WKCustomProtocolLoader>> LoaderMap;
- LoaderMap m_loaderMap;
-#endif
-};
-
-} // namespace WebKit
-
-#endif // CustomProtocolManagerProxy_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxymessagesin"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -1,26 +0,0 @@
</span><del>-# Copyright (C) 2012 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-messages -> CustomProtocolManagerProxy {
- StartLoading(uint64_t customProtocolID, WebCore::ResourceRequest request)
- StopLoading(uint64_t customProtocolID)
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsLegacyCustomProtocolManagerProxycpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,86 @@
</span><ins>+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "LegacyCustomProtocolManagerProxy.h"
+
+#include "APICustomProtocolManagerClient.h"
+#include "ChildProcessProxy.h"
+#include "LegacyCustomProtocolManagerMessages.h"
+#include "LegacyCustomProtocolManagerProxyMessages.h"
+#include "WebProcessPool.h"
+#include <WebCore/ResourceRequest.h>
+
+namespace WebKit {
+
+LegacyCustomProtocolManagerProxy::LegacyCustomProtocolManagerProxy(ChildProcessProxy* childProcessProxy, WebProcessPool& processPool)
+ : m_childProcessProxy(childProcessProxy)
+ , m_processPool(processPool)
+{
+ ASSERT(m_childProcessProxy);
+ m_childProcessProxy->addMessageReceiver(Messages::LegacyCustomProtocolManagerProxy::messageReceiverName(), *this);
+}
+
+LegacyCustomProtocolManagerProxy::~LegacyCustomProtocolManagerProxy()
+{
+ m_childProcessProxy->removeMessageReceiver(Messages::LegacyCustomProtocolManagerProxy::messageReceiverName());
+}
+
+void LegacyCustomProtocolManagerProxy::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest& request)
+{
+ m_processPool.customProtocolManagerClient().startLoading(*this, customProtocolID, request);
+}
+
+void LegacyCustomProtocolManagerProxy::stopLoading(uint64_t customProtocolID)
+{
+ m_processPool.customProtocolManagerClient().stopLoading(*this, customProtocolID);
+}
+
+void LegacyCustomProtocolManagerProxy::processDidClose()
+{
+ m_processPool.customProtocolManagerClient().invalidate(*this);
+}
+
+void LegacyCustomProtocolManagerProxy::wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse)
+{
+ m_childProcessProxy->send(Messages::LegacyCustomProtocolManager::WasRedirectedToRequest(customProtocolID, request, redirectResponse), 0);
+}
+
+void LegacyCustomProtocolManagerProxy::didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse& response, uint32_t cacheStoragePolicy)
+{
+ m_childProcessProxy->send(Messages::LegacyCustomProtocolManager::DidReceiveResponse(customProtocolID, response, cacheStoragePolicy), 0);
+}
+
+void LegacyCustomProtocolManagerProxy::didLoadData(uint64_t customProtocolID, const IPC::DataReference& data)
+{
+ m_childProcessProxy->send(Messages::LegacyCustomProtocolManager::DidLoadData(customProtocolID, data), 0);
+}
+
+void LegacyCustomProtocolManagerProxy::didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError& error)
+{
+ m_childProcessProxy->send(Messages::LegacyCustomProtocolManager::DidFailWithError(customProtocolID, error), 0);
+}
+
+void LegacyCustomProtocolManagerProxy::didFinishLoading(uint64_t customProtocolID)
+{
+ m_childProcessProxy->send(Messages::LegacyCustomProtocolManager::DidFinishLoading(customProtocolID), 0);
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsLegacyCustomProtocolManagerProxyhfromrev213440trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h (from rev 213440, trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "MessageReceiver.h"
+
+#if PLATFORM(COCOA)
+#include <wtf/HashMap.h>
+#include <wtf/RetainPtr.h>
+OBJC_CLASS WKCustomProtocolLoader;
+#endif
+
+namespace IPC {
+class DataReference;
+}
+
+namespace WebCore {
+class ResourceError;
+class ResourceRequest;
+class ResourceResponse;
+} // namespace WebCore
+
+namespace WebKit {
+
+class ChildProcessProxy;
+class WebProcessPool;
+
+class LegacyCustomProtocolManagerProxy : public IPC::MessageReceiver {
+public:
+ LegacyCustomProtocolManagerProxy(ChildProcessProxy*, WebProcessPool&);
+ ~LegacyCustomProtocolManagerProxy();
+
+ void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&);
+ void stopLoading(uint64_t customProtocolID);
+
+ void processDidClose();
+
+ void wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
+ void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&, uint32_t cacheStoragePolicy);
+ void didLoadData(uint64_t customProtocolID, const IPC::DataReference&);
+ void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&);
+ void didFinishLoading(uint64_t customProtocolID);
+
+private:
+ // IPC::MessageReceiver
+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
+
+ ChildProcessProxy* m_childProcessProxy;
+ WebProcessPool& m_processPool;
+
+#if PLATFORM(COCOA)
+ typedef HashMap<uint64_t, RetainPtr<WKCustomProtocolLoader>> LoaderMap;
+ LoaderMap m_loaderMap;
+#endif
+};
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsLegacyCustomProtocolManagerProxymessagesinfromrev213440trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxymessagesin"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in (from rev 213440, trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+# Copyright (C) 2012 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -> LegacyCustomProtocolManagerProxy {
+ StartLoading(uint64_t customProtocolID, WebCore::ResourceRequest request)
+ StopLoading(uint64_t customProtocolID)
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -27,9 +27,9 @@
</span><span class="cx"> #include "NetworkProcessProxy.h"
</span><span class="cx">
</span><span class="cx"> #include "AuthenticationChallengeProxy.h"
</span><del>-#include "CustomProtocolManagerProxyMessages.h"
</del><span class="cx"> #include "DatabaseProcessMessages.h"
</span><span class="cx"> #include "DownloadProxyMessages.h"
</span><ins>+#include "LegacyCustomProtocolManagerProxyMessages.h"
</ins><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "NetworkProcessCreationParameters.h"
</span><span class="cx"> #include "NetworkProcessMessages.h"
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkNetworkProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #define NetworkProcessProxy_h
</span><span class="cx">
</span><span class="cx"> #include "ChildProcessProxy.h"
</span><del>-#include "CustomProtocolManagerProxy.h"
</del><ins>+#include "LegacyCustomProtocolManagerProxy.h"
</ins><span class="cx"> #include "ProcessLauncher.h"
</span><span class="cx"> #include "ProcessThrottler.h"
</span><span class="cx"> #include "ProcessThrottlerClient.h"
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx"> HashMap<uint64_t, std::function<void ()>> m_pendingDeleteWebsiteDataForOriginsCallbacks;
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<DownloadProxyMap> m_downloadProxyMap;
</span><del>- CustomProtocolManagerProxy m_customProtocolManagerProxy;
</del><ins>+ LegacyCustomProtocolManagerProxy m_customProtocolManagerProxy;
</ins><span class="cx"> ProcessThrottler m_throttler;
</span><span class="cx"> ProcessThrottler::BackgroundActivityToken m_tokenForHoldingLockedFiles;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebLoadingProviderProxycppfromrev213440trunkSourceWebKit2UIProcessAPIAPICustomProtocolManagerClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.cpp (from rev 213440, trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.cpp         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebLoadingProviderProxy.h"
+
+namespace WebKit {
+
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebLoadingProviderProxyhfromrev213440trunkSourceWebKit2UIProcessAPIAPICustomProtocolManagerClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.h (from rev 213440, trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebKit {
+
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebLoadingProviderProxymessagesinfromrev213440trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxymessagesin"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.messages.in (from rev 213440, trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in) (0 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.messages.in         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebLoadingProviderProxy.messages.in        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+# Copyright (C) 2017 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -> WebLoadingProviderProxy {
+ StartLoading(uint64_t customProtocolID, WebCore::ResourceRequest request)
+ StopLoading(uint64_t customProtocolID)
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -33,11 +33,11 @@
</span><span class="cx"> #include "APILegacyContextHistoryClient.h"
</span><span class="cx"> #include "APIPageConfiguration.h"
</span><span class="cx"> #include "APIProcessPoolConfiguration.h"
</span><del>-#include "CustomProtocolManagerMessages.h"
</del><span class="cx"> #include "DownloadProxy.h"
</span><span class="cx"> #include "DownloadProxyMessages.h"
</span><span class="cx"> #include "GamepadData.h"
</span><span class="cx"> #include "HighPerformanceGraphicsUsageSampler.h"
</span><ins>+#include "LegacyCustomProtocolManagerMessages.h"
</ins><span class="cx"> #include "LogInitialization.h"
</span><span class="cx"> #include "NetworkProcessCreationParameters.h"
</span><span class="cx"> #include "NetworkProcessMessages.h"
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx"> m_automationClient = WTFMove(automationClient);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebProcessPool::setCustomProtocolManagerClient(std::unique_ptr<API::CustomProtocolManagerClient>&& customProtocolManagerClient)
</del><ins>+void WebProcessPool::setLegacyCustomProtocolManagerClient(std::unique_ptr<API::CustomProtocolManagerClient>&& customProtocolManagerClient)
</ins><span class="cx"> {
</span><span class="cx"> if (!customProtocolManagerClient)
</span><span class="cx"> m_customProtocolManagerClient = std::make_unique<API::CustomProtocolManagerClient>();
</span><span class="lines">@@ -1406,13 +1406,13 @@
</span><span class="cx"> {
</span><span class="cx"> if (!globalURLSchemesWithCustomProtocolHandlers().contains(scheme))
</span><span class="cx"> m_urlSchemesRegisteredForCustomProtocols.add(scheme);
</span><del>- sendToNetworkingProcess(Messages::CustomProtocolManager::RegisterScheme(scheme));
</del><ins>+ sendToNetworkingProcess(Messages::LegacyCustomProtocolManager::RegisterScheme(scheme));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcessPool::unregisterSchemeForCustomProtocol(const String& scheme)
</span><span class="cx"> {
</span><span class="cx"> m_urlSchemesRegisteredForCustomProtocols.remove(scheme);
</span><del>- sendToNetworkingProcess(Messages::CustomProtocolManager::UnregisterScheme(scheme));
</del><ins>+ sendToNetworkingProcess(Messages::LegacyCustomProtocolManager::UnregisterScheme(scheme));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx"> void setHistoryClient(std::unique_ptr<API::LegacyContextHistoryClient>);
</span><span class="cx"> void setDownloadClient(std::unique_ptr<API::DownloadClient>);
</span><span class="cx"> void setAutomationClient(std::unique_ptr<API::AutomationClient>);
</span><del>- void setCustomProtocolManagerClient(std::unique_ptr<API::CustomProtocolManagerClient>&&);
</del><ins>+ void setLegacyCustomProtocolManagerClient(std::unique_ptr<API::CustomProtocolManagerClient>&&);
</ins><span class="cx">
</span><span class="cx"> void setMaximumNumberOfProcesses(unsigned); // Can only be called when there are no processes running.
</span><span class="cx"> unsigned maximumNumberOfProcesses() const { return !m_configuration->maximumProcessCount() ? UINT_MAX : m_configuration->maximumProcessCount(); }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -594,11 +594,11 @@
</span><span class="cx">                 29501724162A4504004A9D71 /* WKWebProcessPlugInBrowserContextControllerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 29501723162A4504004A9D71 /* WKWebProcessPlugInBrowserContextControllerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 296BD85D15019BC30071F424 /* StringUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 296BD85B15019BC30071F424 /* StringUtilities.h */; };
</span><span class="cx">                 296BD85E15019BC30071F424 /* StringUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 296BD85C15019BC30071F424 /* StringUtilities.mm */; };
</span><del>-                2984F57C164B915F004BC0C6 /* CustomProtocolManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2984F57A164B915F004BC0C6 /* CustomProtocolManagerProxyMessageReceiver.cpp */; };
-                2984F57D164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2984F57B164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h */; };
-                2984F588164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2984F586164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp */; };
-                2984F589164BA095004BC0C6 /* CustomProtocolManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2984F587164BA095004BC0C6 /* CustomProtocolManagerMessages.h */; };
-                29AD3093164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 29AD3092164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h */; };
</del><ins>+                2984F57C164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2984F57A164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessageReceiver.cpp */; };
+                2984F57D164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2984F57B164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessages.h */; };
+                2984F588164BA095004BC0C6 /* LegacyCustomProtocolManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2984F586164BA095004BC0C6 /* LegacyCustomProtocolManagerMessageReceiver.cpp */; };
+                2984F589164BA095004BC0C6 /* LegacyCustomProtocolManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2984F587164BA095004BC0C6 /* LegacyCustomProtocolManagerMessages.h */; };
+                29AD3093164B4C5D0072DEA9 /* LegacyCustomProtocolManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 29AD3092164B4C5D0072DEA9 /* LegacyCustomProtocolManagerProxy.h */; };
</ins><span class="cx">                 29CD55AA128E294F00133C85 /* WKAccessibilityWebPageObjectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObjectBase.h */; };
</span><span class="cx">                 29CD55AB128E294F00133C85 /* WKAccessibilityWebPageObjectBase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObjectBase.mm */; };
</span><span class="cx">                 2D1087601D2C573E00B85F82 /* LoadParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D10875E1D2C573E00B85F82 /* LoadParameters.cpp */; };
</span><span class="lines">@@ -1127,8 +1127,8 @@
</span><span class="cx">                 5C1427111C23F89E00D41183 /* DownloadIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14270D1C23F88500D41183 /* DownloadIOS.mm */; };
</span><span class="cx">                 5C1427121C23F89E00D41183 /* DownloadMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14270F1C23F89900D41183 /* DownloadMac.mm */; };
</span><span class="cx">                 5C1427131C23F89E00D41183 /* DownloadCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C1427091C23F86900D41183 /* DownloadCocoa.mm */; };
</span><del>-                5C1427181C23F8B700D41183 /* CustomProtocolManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1427141C23F8B000D41183 /* CustomProtocolManager.h */; };
-                5C14271D1C23F8CF00D41183 /* CustomProtocolManagerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14271B1C23F8CC00D41183 /* CustomProtocolManagerCocoa.mm */; };
</del><ins>+                5C1427181C23F8B700D41183 /* LegacyCustomProtocolManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1427141C23F8B000D41183 /* LegacyCustomProtocolManager.h */; };
+                5C14271D1C23F8CF00D41183 /* LegacyCustomProtocolManagerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14271B1C23F8CC00D41183 /* LegacyCustomProtocolManagerCocoa.mm */; };
</ins><span class="cx">                 5C20CB9D1BB0DCFA00895BB1 /* NetworkSessionCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C20CB9B1BB0DCD200895BB1 /* NetworkSessionCocoa.mm */; };
</span><span class="cx">                 5C20CBA01BB1ECD800895BB1 /* NetworkSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C20CB9E1BB0DD1800895BB1 /* NetworkSession.h */; };
</span><span class="cx">                 5C298DA01C3DF02100470AFE /* PendingDownload.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C298D9E1C3DEF2900470AFE /* PendingDownload.h */; };
</span><span class="lines">@@ -1144,7 +1144,7 @@
</span><span class="cx">                 5CBC9B8D1C65279C00A8FDCF /* NetworkDataTaskCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CBC9B8B1C65257300A8FDCF /* NetworkDataTaskCocoa.mm */; };
</span><span class="cx">                 5CBC9B8E1C652CA000A8FDCF /* NetworkDataTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CBC9B891C6524A500A8FDCF /* NetworkDataTask.h */; };
</span><span class="cx">                 5CE85B201C88E64B0070BFCE /* PingLoad.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE85B1F1C88E6430070BFCE /* PingLoad.h */; };
</span><del>-                5CFECB041E1ED1CC00F88504 /* CustomProtocolManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CFECB031E1ED1C800F88504 /* CustomProtocolManager.cpp */; };
</del><ins>+                5CFECB041E1ED1CC00F88504 /* LegacyCustomProtocolManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CFECB031E1ED1C800F88504 /* LegacyCustomProtocolManager.cpp */; };
</ins><span class="cx">                 6501BD1A12F1243400E9F248 /* WKBundleInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65B86F1712F11D7B00B7DD8A /* WKBundleInspector.cpp */; };
</span><span class="cx">                 659C551E130006410025C0C2 /* InjectedBundlePageResourceLoadClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6546A82913000164000CEB1C /* InjectedBundlePageResourceLoadClient.cpp */; };
</span><span class="cx">                 65B86F1E12F11DE300B7DD8A /* WKBundleInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 65B86F1812F11D7B00B7DD8A /* WKBundleInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1172,9 +1172,9 @@
</span><span class="cx">                 7A791EFA1C7CFCF100C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */; };
</span><span class="cx">                 7A791EFB1C7CFD0100C4C52B /* WebResourceLoadStatisticsStoreMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */; };
</span><span class="cx">                 7A791EFC1C7D08C500C4C52B /* WebResourceLoadStatisticsStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A9CD8C01C77984900D9F6C7 /* WebResourceLoadStatisticsStore.cpp */; };
</span><del>-                7A821F4A1E2F65E900604577 /* CustomProtocolManagerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A821F491E2F65DD00604577 /* CustomProtocolManagerProxy.cpp */; };
-                7A821F4C1E2F673900604577 /* CustomProtocolManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A821F4B1E2F664800604577 /* CustomProtocolManagerClient.h */; };
-                7A821F4E1E2F67A800604577 /* CustomProtocolManagerClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A821F4D1E2F679E00604577 /* CustomProtocolManagerClient.mm */; };
</del><ins>+                7A821F4A1E2F65E900604577 /* LegacyCustomProtocolManagerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A821F491E2F65DD00604577 /* LegacyCustomProtocolManagerProxy.cpp */; };
+                7A821F4C1E2F673900604577 /* LegacyCustomProtocolManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */; };
+                7A821F4E1E2F67A800604577 /* LegacyCustomProtocolManagerClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A821F4D1E2F679E00604577 /* LegacyCustomProtocolManagerClient.mm */; };
</ins><span class="cx">                 7A821F501E2F7A7500604577 /* APICustomProtocolManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A821F4F1E2F7A5C00604577 /* APICustomProtocolManagerClient.h */; };
</span><span class="cx">                 7C065F2B1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C065F291C8CD95F00C2D950 /* WebUserContentControllerDataTypes.cpp */; };
</span><span class="cx">                 7C065F2C1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C065F2A1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h */; };
</span><span class="lines">@@ -2745,12 +2745,12 @@
</span><span class="cx">                 29501723162A4504004A9D71 /* WKWebProcessPlugInBrowserContextControllerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebProcessPlugInBrowserContextControllerPrivate.h; sourceTree = "<group>"; };
</span><span class="cx">                 296BD85B15019BC30071F424 /* StringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringUtilities.h; sourceTree = "<group>"; };
</span><span class="cx">                 296BD85C15019BC30071F424 /* StringUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringUtilities.mm; sourceTree = "<group>"; };
</span><del>-                2984F57A164B915F004BC0C6 /* CustomProtocolManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomProtocolManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
-                2984F57B164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomProtocolManagerProxyMessages.h; sourceTree = "<group>"; };
-                2984F586164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomProtocolManagerMessageReceiver.cpp; sourceTree = "<group>"; };
-                2984F587164BA095004BC0C6 /* CustomProtocolManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomProtocolManagerMessages.h; sourceTree = "<group>"; };
-                29AD3092164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomProtocolManagerProxy.h; path = CustomProtocols/CustomProtocolManagerProxy.h; sourceTree = "<group>"; };
-                29AD3097164B4E210072DEA9 /* CustomProtocolManagerProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CustomProtocolManagerProxy.messages.in; path = CustomProtocols/CustomProtocolManagerProxy.messages.in; sourceTree = "<group>"; };
</del><ins>+                2984F57A164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyCustomProtocolManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
+                2984F57B164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyCustomProtocolManagerProxyMessages.h; sourceTree = "<group>"; };
+                2984F586164BA095004BC0C6 /* LegacyCustomProtocolManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyCustomProtocolManagerMessageReceiver.cpp; sourceTree = "<group>"; };
+                2984F587164BA095004BC0C6 /* LegacyCustomProtocolManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyCustomProtocolManagerMessages.h; sourceTree = "<group>"; };
+                29AD3092164B4C5D0072DEA9 /* LegacyCustomProtocolManagerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LegacyCustomProtocolManagerProxy.h; path = CustomProtocols/LegacyCustomProtocolManagerProxy.h; sourceTree = "<group>"; };
+                29AD3097164B4E210072DEA9 /* LegacyCustomProtocolManagerProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LegacyCustomProtocolManagerProxy.messages.in; path = CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in; sourceTree = "<group>"; };
</ins><span class="cx">                 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObjectBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAccessibilityWebPageObjectBase.h; sourceTree = "<group>"; };
</span><span class="cx">                 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObjectBase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKAccessibilityWebPageObjectBase.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2D0035221BC7414800DA8716 /* DeprecatedPDFPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeprecatedPDFPlugin.h; path = PDF/DeprecatedPDFPlugin.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -3329,9 +3329,9 @@
</span><span class="cx">                 5C1427091C23F86900D41183 /* DownloadCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadCocoa.mm; path = NetworkProcess/Downloads/cocoa/DownloadCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">                 5C14270D1C23F88500D41183 /* DownloadIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadIOS.mm; path = NetworkProcess/Downloads/ios/DownloadIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 5C14270F1C23F89900D41183 /* DownloadMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadMac.mm; path = NetworkProcess/Downloads/mac/DownloadMac.mm; sourceTree = "<group>"; };
</span><del>-                5C1427141C23F8B000D41183 /* CustomProtocolManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomProtocolManager.h; path = NetworkProcess/CustomProtocols/CustomProtocolManager.h; sourceTree = "<group>"; };
-                5C1427151C23F8B000D41183 /* CustomProtocolManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CustomProtocolManager.messages.in; path = NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in; sourceTree = "<group>"; };
-                5C14271B1C23F8CC00D41183 /* CustomProtocolManagerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CustomProtocolManagerCocoa.mm; path = NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm; sourceTree = "<group>"; };
</del><ins>+                5C1427141C23F8B000D41183 /* LegacyCustomProtocolManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LegacyCustomProtocolManager.h; path = NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h; sourceTree = "<group>"; };
+                5C1427151C23F8B000D41183 /* LegacyCustomProtocolManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LegacyCustomProtocolManager.messages.in; path = NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in; sourceTree = "<group>"; };
+                5C14271B1C23F8CC00D41183 /* LegacyCustomProtocolManagerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = LegacyCustomProtocolManagerCocoa.mm; path = NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm; sourceTree = "<group>"; };
</ins><span class="cx">                 5C20CB9B1BB0DCD200895BB1 /* NetworkSessionCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkSessionCocoa.mm; path = NetworkProcess/cocoa/NetworkSessionCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">                 5C20CB9E1BB0DD1800895BB1 /* NetworkSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkSession.h; path = NetworkProcess/NetworkSession.h; sourceTree = "<group>"; };
</span><span class="cx">                 5C298D9E1C3DEF2900470AFE /* PendingDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PendingDownload.h; path = NetworkProcess/Downloads/PendingDownload.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -3349,7 +3349,7 @@
</span><span class="cx">                 5CBC9B891C6524A500A8FDCF /* NetworkDataTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkDataTask.h; path = NetworkProcess/NetworkDataTask.h; sourceTree = "<group>"; };
</span><span class="cx">                 5CBC9B8B1C65257300A8FDCF /* NetworkDataTaskCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkDataTaskCocoa.mm; path = NetworkProcess/cocoa/NetworkDataTaskCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">                 5CE85B1F1C88E6430070BFCE /* PingLoad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PingLoad.h; path = NetworkProcess/PingLoad.h; sourceTree = "<group>"; };
</span><del>-                5CFECB031E1ED1C800F88504 /* CustomProtocolManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CustomProtocolManager.cpp; path = NetworkProcess/CustomProtocols/CustomProtocolManager.cpp; sourceTree = "<group>"; };
</del><ins>+                5CFECB031E1ED1C800F88504 /* LegacyCustomProtocolManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LegacyCustomProtocolManager.cpp; path = NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 5D442A5516D5856700AC3331 /* PluginService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PluginService.entitlements; sourceTree = "<group>"; };
</span><span class="cx">                 5DAD73F1116FF90C00EE5396 /* BaseTarget.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = BaseTarget.xcconfig; sourceTree = "<group>"; };
</span><span class="cx">                 6546A82913000164000CEB1C /* InjectedBundlePageResourceLoadClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageResourceLoadClient.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -3381,9 +3381,9 @@
</span><span class="cx">                 7A5E39491D5BD8A700B4B7CE /* com.macromedia.Flash Player ESR.plugin.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "com.macromedia.Flash Player ESR.plugin.sb"; sourceTree = "<group>"; };
</span><span class="cx">                 7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebResourceLoadStatisticsStoreMessages.h; sourceTree = "<group>"; };
</span><span class="cx">                 7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceLoadStatisticsStoreMessageReceiver.cpp; sourceTree = "<group>"; };
</span><del>-                7A821F491E2F65DD00604577 /* CustomProtocolManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CustomProtocolManagerProxy.cpp; path = CustomProtocols/CustomProtocolManagerProxy.cpp; sourceTree = "<group>"; };
-                7A821F4B1E2F664800604577 /* CustomProtocolManagerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomProtocolManagerClient.h; sourceTree = "<group>"; };
-                7A821F4D1E2F679E00604577 /* CustomProtocolManagerClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CustomProtocolManagerClient.mm; sourceTree = "<group>"; };
</del><ins>+                7A821F491E2F65DD00604577 /* LegacyCustomProtocolManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LegacyCustomProtocolManagerProxy.cpp; path = CustomProtocols/LegacyCustomProtocolManagerProxy.cpp; sourceTree = "<group>"; };
+                7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyCustomProtocolManagerClient.h; sourceTree = "<group>"; };
+                7A821F4D1E2F679E00604577 /* LegacyCustomProtocolManagerClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LegacyCustomProtocolManagerClient.mm; sourceTree = "<group>"; };
</ins><span class="cx">                 7A821F4F1E2F7A5C00604577 /* APICustomProtocolManagerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APICustomProtocolManagerClient.h; sourceTree = "<group>"; };
</span><span class="cx">                 7A9CD8C01C77984900D9F6C7 /* WebResourceLoadStatisticsStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceLoadStatisticsStore.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7A9CD8C11C77984900D9F6C7 /* WebResourceLoadStatisticsStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebResourceLoadStatisticsStore.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -4232,8 +4232,8 @@
</span><span class="cx">                 E4E8648E1B1673FB00C82F40 /* VersionChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VersionChecks.h; sourceTree = "<group>"; };
</span><span class="cx">                 E4E8648F1B1673FB00C82F40 /* VersionChecks.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VersionChecks.mm; sourceTree = "<group>"; };
</span><span class="cx">                 ECA680D31E6904B500731D20 /* ExtraPrivateSymbolsForTAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtraPrivateSymbolsForTAPI.h; sourceTree = "<group>"; };
</span><ins>+                ECA680D71E690DF800731D20 /* WebProcessCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebProcessCocoa.h; sourceTree = "<group>"; };
</ins><span class="cx">                 ECBFC1DB1E6A4D66000300C7 /* ExtraPublicSymbolsForTAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtraPublicSymbolsForTAPI.h; sourceTree = "<group>"; };
</span><del>-                ECA680D71E690DF800731D20 /* WebProcessCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebProcessCocoa.h; sourceTree = "<group>"; };
</del><span class="cx">                 F036978715F4BF0500C3A80E /* WebColorPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPicker.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 F43370961E4D6A4400052B0E /* _WKTestingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKTestingDelegate.h; sourceTree = "<group>"; };
</span><span class="cx">                 F6113E24126CE1820057D0A7 /* APIUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIUserContentURLPattern.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -5028,8 +5028,8 @@
</span><span class="cx">                                 99C81D561C20DFBE005C4C82 /* AutomationClient.mm */,
</span><span class="cx">                                 990D28B71C6539A000986977 /* AutomationSessionClient.h */,
</span><span class="cx">                                 990D28B81C6539A000986977 /* AutomationSessionClient.mm */,
</span><del>-                                7A821F4B1E2F664800604577 /* CustomProtocolManagerClient.h */,
-                                7A821F4D1E2F679E00604577 /* CustomProtocolManagerClient.mm */,
</del><ins>+                                7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */,
+                                7A821F4D1E2F679E00604577 /* LegacyCustomProtocolManagerClient.mm */,
</ins><span class="cx">                                 83891B6A1A68C30B0030F386 /* DiagnosticLoggingClient.h */,
</span><span class="cx">                                 83891B6B1A68C30B0030F386 /* DiagnosticLoggingClient.mm */,
</span><span class="cx">                                 A1DF631118E0B7C8003A3E2A /* DownloadClient.h */,
</span><span class="lines">@@ -5188,21 +5188,13 @@
</span><span class="cx">                 29AD3091164B4C100072DEA9 /* CustomProtocols */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                29AD3094164B4C830072DEA9 /* mac */,
-                                29AD3092164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h */,
-                                7A821F491E2F65DD00604577 /* CustomProtocolManagerProxy.cpp */,
-                                29AD3097164B4E210072DEA9 /* CustomProtocolManagerProxy.messages.in */,
</del><ins>+                                29AD3092164B4C5D0072DEA9 /* LegacyCustomProtocolManagerProxy.h */,
+                                7A821F491E2F65DD00604577 /* LegacyCustomProtocolManagerProxy.cpp */,
+                                29AD3097164B4E210072DEA9 /* LegacyCustomProtocolManagerProxy.messages.in */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = CustomProtocols;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="cx">                 };
</span><del>-                29AD3094164B4C830072DEA9 /* mac */ = {
-                        isa = PBXGroup;
-                        children = (
-                        );
-                        name = mac;
-                        sourceTree = "<group>";
-                };
</del><span class="cx">                 2D28F3DF1885CCB4004B9EAE /* ios */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -6119,10 +6111,10 @@
</span><span class="cx">                 5C1426F21C23F82D00D41183 /* CustomProtocols */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                5CFECB031E1ED1C800F88504 /* CustomProtocolManager.cpp */,
</del><span class="cx">                                 5C14271A1C23F8BF00D41183 /* Cocoa */,
</span><del>-                                5C1427141C23F8B000D41183 /* CustomProtocolManager.h */,
-                                5C1427151C23F8B000D41183 /* CustomProtocolManager.messages.in */,
</del><ins>+                                5CFECB031E1ED1C800F88504 /* LegacyCustomProtocolManager.cpp */,
+                                5C1427141C23F8B000D41183 /* LegacyCustomProtocolManager.h */,
+                                5C1427151C23F8B000D41183 /* LegacyCustomProtocolManager.messages.in */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = CustomProtocols;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -6154,7 +6146,7 @@
</span><span class="cx">                 5C14271A1C23F8BF00D41183 /* Cocoa */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                5C14271B1C23F8CC00D41183 /* CustomProtocolManagerCocoa.mm */,
</del><ins>+                                5C14271B1C23F8CC00D41183 /* LegacyCustomProtocolManagerCocoa.mm */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = Cocoa;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -7540,10 +7532,6 @@
</span><span class="cx">                                 E17AE2C216B9C63A001C42F1 /* com.apple.WebKit.NetworkProcess.sb */,
</span><span class="cx">                                 7A1506721DD56298001F4B58 /* com.apple.WebKit.plugin-common.sb */,
</span><span class="cx">                                 E1967E37150AB5E200C73169 /* com.apple.WebProcess.sb */,
</span><del>-                                2984F586164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp */,
-                                2984F587164BA095004BC0C6 /* CustomProtocolManagerMessages.h */,
-                                2984F57A164B915F004BC0C6 /* CustomProtocolManagerProxyMessageReceiver.cpp */,
-                                2984F57B164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h */,
</del><span class="cx">                                 512A975E180E03160039A149 /* DatabaseProcessMessageReceiver.cpp */,
</span><span class="cx">                                 512A975F180E03160039A149 /* DatabaseProcessMessages.h */,
</span><span class="cx">                                 512A9767180E09B80039A149 /* DatabaseProcessProxyMessageReceiver.cpp */,
</span><span class="lines">@@ -7558,6 +7546,10 @@
</span><span class="cx">                                 1A64230712DD09EB00CAAE2C /* DrawingAreaProxyMessages.h */,
</span><span class="cx">                                 1AA575FF1496B7C000A4EE06 /* EventDispatcherMessageReceiver.cpp */,
</span><span class="cx">                                 1AA576001496B7C000A4EE06 /* EventDispatcherMessages.h */,
</span><ins>+                                2984F586164BA095004BC0C6 /* LegacyCustomProtocolManagerMessageReceiver.cpp */,
+                                2984F587164BA095004BC0C6 /* LegacyCustomProtocolManagerMessages.h */,
+                                2984F57A164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessageReceiver.cpp */,
+                                2984F57B164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessages.h */,
</ins><span class="cx">                                 51DD9F2616367DA2001578E9 /* NetworkConnectionToWebProcessMessageReceiver.cpp */,
</span><span class="cx">                                 51DD9F2716367DA2001578E9 /* NetworkConnectionToWebProcessMessages.h */,
</span><span class="cx">                                 517CF0E1163A486C00C2950E /* NetworkProcessConnectionMessageReceiver.cpp */,
</span><span class="lines">@@ -8069,10 +8061,10 @@
</span><span class="cx">                                 CDC3830C17212282008A2FC3 /* CookieStorageShimLibrary.h in Headers */,
</span><span class="cx">                                 CE1A0BD31A48E6C60054EF74 /* CorePDFSPI.h in Headers */,
</span><span class="cx">                                 B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */,
</span><del>-                                5C1427181C23F8B700D41183 /* CustomProtocolManager.h in Headers */,
-                                2984F589164BA095004BC0C6 /* CustomProtocolManagerMessages.h in Headers */,
-                                29AD3093164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h in Headers */,
-                                2984F57D164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h in Headers */,
</del><ins>+                                5C1427181C23F8B700D41183 /* LegacyCustomProtocolManager.h in Headers */,
+                                2984F589164BA095004BC0C6 /* LegacyCustomProtocolManagerMessages.h in Headers */,
+                                29AD3093164B4C5D0072DEA9 /* LegacyCustomProtocolManagerProxy.h in Headers */,
+                                2984F57D164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessages.h in Headers */,
</ins><span class="cx">                                 515E772C184008B90007203F /* DatabaseProcessCreationParameters.h in Headers */,
</span><span class="cx">                                 512A9761180E031D0039A149 /* DatabaseProcessMessages.h in Headers */,
</span><span class="cx">                                 517DD5BF180DA7D30081660B /* DatabaseProcessProxy.h in Headers */,
</span><span class="lines">@@ -8262,7 +8254,7 @@
</span><span class="cx">                                 41DC459F1E3DBDA500B11F51 /* WebRTCSocket.h in Headers */,
</span><span class="cx">                                 1A0EC906124C0AB8007EF4A5 /* PluginProcessConnection.h in Headers */,
</span><span class="cx">                                 1A0EC90F124C0AF5007EF4A5 /* PluginProcessConnectionManager.h in Headers */,
</span><del>-                                7A821F4C1E2F673900604577 /* CustomProtocolManagerClient.h in Headers */,
</del><ins>+                                7A821F4C1E2F673900604577 /* LegacyCustomProtocolManagerClient.h in Headers */,
</ins><span class="cx">                                 1A7865BA16CAC71500ACE83A /* PluginProcessConnectionManagerMessages.h in Headers */,
</span><span class="cx">                                 1A2BB6D114117B4D000F35D4 /* PluginProcessConnectionMessages.h in Headers */,
</span><span class="cx">                                 1A2D90D21281C966001EB962 /* PluginProcessCreationParameters.h in Headers */,
</span><span class="lines">@@ -9585,9 +9577,9 @@
</span><span class="cx">                                 5106D7C218BDBE73000AB166 /* ContextMenuContextData.cpp in Sources */,
</span><span class="cx">                                 CDC3831017212440008A2FC3 /* CookieStorageShim.mm in Sources */,
</span><span class="cx">                                 B878B616133428DC006888E9 /* CorrectionPanel.mm in Sources */,
</span><del>-                                5C14271D1C23F8CF00D41183 /* CustomProtocolManagerCocoa.mm in Sources */,
-                                2984F588164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp in Sources */,
-                                2984F57C164B915F004BC0C6 /* CustomProtocolManagerProxyMessageReceiver.cpp in Sources */,
</del><ins>+                                5C14271D1C23F8CF00D41183 /* LegacyCustomProtocolManagerCocoa.mm in Sources */,
+                                2984F588164BA095004BC0C6 /* LegacyCustomProtocolManagerMessageReceiver.cpp in Sources */,
+                                2984F57C164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessageReceiver.cpp in Sources */,
</ins><span class="cx">                                 51E351FF180F5D0F00E53BE9 /* DatabaseProcess.cpp in Sources */,
</span><span class="cx">                                 515E772B184008B90007203F /* DatabaseProcessCreationParameters.cpp in Sources */,
</span><span class="cx">                                 E115C714190F89E400ECC516 /* DatabaseProcessIOS.mm in Sources */,
</span><span class="lines">@@ -9793,7 +9785,7 @@
</span><span class="cx">                                 1A043977124D034800FFBFB5 /* PluginProcess.cpp in Sources */,
</span><span class="cx">                                 1A0EC907124C0AB8007EF4A5 /* PluginProcessConnection.cpp in Sources */,
</span><span class="cx">                                 1A0EC910124C0AF5007EF4A5 /* PluginProcessConnectionManager.cpp in Sources */,
</span><del>-                                5CFECB041E1ED1CC00F88504 /* CustomProtocolManager.cpp in Sources */,
</del><ins>+                                5CFECB041E1ED1CC00F88504 /* LegacyCustomProtocolManager.cpp in Sources */,
</ins><span class="cx">                                 1A7865B916CAC71500ACE83A /* PluginProcessConnectionManagerMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 1A2BB6D014117B4D000F35D4 /* PluginProcessConnectionMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 1A2D90D31281C966001EB962 /* PluginProcessCreationParameters.cpp in Sources */,
</span><span class="lines">@@ -10253,7 +10245,7 @@
</span><span class="cx">                                 1AB40EE51BF677E300BA81BE /* WKMenuItemIdentifiers.mm in Sources */,
</span><span class="cx">                                 BC4075FD124FF0270068F20A /* WKMutableArray.cpp in Sources */,
</span><span class="cx">                                 BC4075FF124FF0270068F20A /* WKMutableDictionary.cpp in Sources */,
</span><del>-                                7A821F4A1E2F65E900604577 /* CustomProtocolManagerProxy.cpp in Sources */,
</del><ins>+                                7A821F4A1E2F65E900604577 /* LegacyCustomProtocolManagerProxy.cpp in Sources */,
</ins><span class="cx">                                 1A5B1C501898606F004FCF9B /* WKNavigation.mm in Sources */,
</span><span class="cx">                                 1A256E3718A1A788006FB922 /* WKNavigationAction.mm in Sources */,
</span><span class="cx">                                 2D3A65DA1A7C3A1F00CAC637 /* WKNavigationActionRef.cpp in Sources */,
</span><span class="lines">@@ -10357,7 +10349,7 @@
</span><span class="cx">                                 1AD60F5D18E20F4C0020C034 /* WKWindowFeatures.mm in Sources */,
</span><span class="cx">                                 1A7C0DF61B7D1F1000A9B848 /* WKWindowFeaturesRef.cpp in Sources */,
</span><span class="cx">                                 BCBECDE716B6416800047A1A /* XPCServiceEntryPoint.mm in Sources */,
</span><del>-                                7A821F4E1E2F67A800604577 /* CustomProtocolManagerClient.mm in Sources */,
</del><ins>+                                7A821F4E1E2F67A800604577 /* LegacyCustomProtocolManagerClient.mm in Sources */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (213440 => 213441)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2017-03-06 02:48:20 UTC (rev 213440)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2017-03-06 02:53:31 UTC (rev 213441)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #import "WebProcess.h"
</span><span class="cx"> #import "WebProcessCocoa.h"
</span><span class="cx">
</span><del>-#import "CustomProtocolManager.h"
</del><ins>+#import "LegacyCustomProtocolManager.h"
</ins><span class="cx"> #import "Logging.h"
</span><span class="cx"> #import "ObjCObjectGraph.h"
</span><span class="cx"> #import "SandboxExtension.h"
</span></span></pre>
</div>
</div>
</body>
</html>