<!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>[174584] 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/174584">174584</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-10-10 05:49:57 -0700 (Fri, 10 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[SOUP] Remove custom URI schemes implementation
https://bugs.webkit.org/show_bug.cgi?id=128169

Patch by Pascal Jacquemart &lt;p.jacquemart@samsung.com&gt; on 2014-10-10
Reviewed by Carlos Garcia Campos.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/soup/WKAPICastSoup.h:
* UIProcess/API/C/soup/WKContextSoup.cpp: Removed.
* UIProcess/API/C/soup/WKSoupRequestManager.cpp: Removed.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveURIRequest): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/soup/WebSoupRequestManagerClient.cpp: Removed.
* UIProcess/soup/WebSoupRequestManagerProxy.cpp: Removed.
* UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Removed.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/soup/WebKitSoupRequestGeneric.cpp:
(webkitSoupRequestGenericSendAsync):
(webkitSoupRequestGenericSendFinish):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/soup/WebSoupRequestManager.cpp: Removed.
* WebProcess/soup/WebSoupRequestManager.messages.in: Removed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParameterscpp">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParametersh">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKAPICastSouph">trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextcpp">trunk/Source/WebKit2/UIProcess/WebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebKitSoupRequestGenericcpp">trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebProcessSoupcpp">trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKContextSoupcpp">trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKSoupRequestManagercpp">trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerClientcpp">trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerProxycpp">trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerProxymessagesin">trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebSoupRequestManagercpp">trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebSoupRequestManagermessagesin">trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/ChangeLog        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2014-10-10  Pascal Jacquemart  &lt;p.jacquemart@samsung.com&gt;
+
+        [SOUP] Remove custom URI schemes implementation
+        https://bugs.webkit.org/show_bug.cgi?id=128169
+
+        Reviewed by Carlos Garcia Campos.
+
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode):
+        (WebKit::WebProcessCreationParameters::decode):
+        * Shared/WebProcessCreationParameters.h:
+        * UIProcess/API/C/soup/WKAPICastSoup.h:
+        * UIProcess/API/C/soup/WKContextSoup.cpp: Removed.
+        * UIProcess/API/C/soup/WKSoupRequestManager.cpp: Removed.
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::WebContext):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didReceiveURIRequest): Deleted.
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/soup/WebSoupRequestManagerClient.cpp: Removed.
+        * UIProcess/soup/WebSoupRequestManagerProxy.cpp: Removed.
+        * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Removed.
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::WebProcess):
+        * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
+        (webkitSoupRequestGenericSendAsync):
+        (webkitSoupRequestGenericSendFinish):
+        * WebProcess/soup/WebProcessSoup.cpp:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+        * WebProcess/soup/WebSoupRequestManager.cpp: Removed.
+        * WebProcess/soup/WebSoupRequestManager.messages.in: Removed.
+
</ins><span class="cx"> 2014-10-09  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove ENABLE_CSS3_CONDITIONAL_RULES
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -88,9 +88,6 @@
</span><span class="cx">     encoder &lt;&lt; urlSchemesRegisteredForCustomProtocols;
</span><span class="cx"> #endif
</span><span class="cx"> #if USE(SOUP)
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
-    encoder &lt;&lt; urlSchemesRegistered;
-#endif
</del><span class="cx">     encoder &lt;&lt; cookiePersistentStoragePath;
</span><span class="cx">     encoder &lt;&lt; cookiePersistentStorageType;
</span><span class="cx">     encoder.encodeEnum(cookieAcceptPolicy);
</span><span class="lines">@@ -200,10 +197,6 @@
</span><span class="cx">         return false;
</span><span class="cx"> #endif
</span><span class="cx"> #if USE(SOUP)
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
-    if (!decoder.decode(parameters.urlSchemesRegistered))
-        return false;
-#endif
</del><span class="cx">     if (!decoder.decode(parameters.cookiePersistentStoragePath))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.cookiePersistentStorageType))
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -95,9 +95,6 @@
</span><span class="cx">     Vector&lt;String&gt; urlSchemesRegisteredForCustomProtocols;
</span><span class="cx"> #endif
</span><span class="cx"> #if USE(SOUP)
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
-    Vector&lt;String&gt; urlSchemesRegistered;
-#endif
</del><span class="cx">     String cookiePersistentStoragePath;
</span><span class="cx">     uint32_t cookiePersistentStorageType;
</span><span class="cx">     HTTPCookieAcceptPolicy cookieAcceptPolicy;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKAPICastSouph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -37,8 +37,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CUSTOM_PROTOCOLS)
</span><span class="cx"> WK_ADD_API_MAPPING(WKSoupCustomProtocolRequestManagerRef, WebSoupCustomProtocolRequestManager)
</span><del>-#else
-WK_ADD_API_MAPPING(WKSoupRequestManagerRef, WebSoupRequestManagerProxy)
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKContextSoupcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,41 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 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 &quot;config.h&quot;
-#include &quot;WKContextSoup.h&quot;
-
-#include &quot;WKAPICast.h&quot;
-#include &quot;WebContext.h&quot;
-
-// Supplements
-#include &quot;WebSoupRequestManagerProxy.h&quot;
-
-using namespace WebKit;
-
-WKSoupRequestManagerRef WKContextGetSoupRequestManager(WKContextRef contextRef)
-{
-    return toAPI(toImpl(contextRef)-&gt;supplement&lt;WebSoupRequestManagerProxy&gt;());
-}
-
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKSoupRequestManagercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 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 &quot;config.h&quot;
-#include &quot;WKSoupRequestManager.h&quot;
-
-#include &quot;WKAPICast.h&quot;
-#include &quot;WebSoupRequestManagerProxy.h&quot;
-
-using namespace WebKit;
-
-WKTypeID WKSoupRequestManagerGetTypeID()
-{
-    return toAPI(WebSoupRequestManagerProxy::APIType);
-}
-
-void WKSoupRequestManagerSetClient(WKSoupRequestManagerRef soupRequestManagerRef, const WKSoupRequestManagerClientBase* wkClient)
-{
-    toImpl(soupRequestManagerRef)-&gt;initializeClient(wkClient);
-}
-
-void WKSoupRequestManagerRegisterURIScheme(WKSoupRequestManagerRef soupRequestManagerRef, WKStringRef schemeRef)
-{
-    toImpl(soupRequestManagerRef)-&gt;registerURIScheme(toWTFString(schemeRef));
-}
-
-void WKSoupRequestManagerDidHandleURIRequest(WKSoupRequestManagerRef soupRequestManagerRef, WKDataRef data, uint64_t contentLength, WKStringRef mimeTypeRef, uint64_t requestID)
-{
-    toImpl(soupRequestManagerRef)-&gt;didHandleURIRequest(toImpl(data), contentLength, toWTFString(mimeTypeRef), requestID);
-}
-
-void WKSoupRequestManagerDidReceiveURIRequestData(WKSoupRequestManagerRef soupRequestManagerRef, WKDataRef data, uint64_t requestID)
-{
-    toImpl(soupRequestManagerRef)-&gt;didReceiveURIRequestData(toImpl(data), requestID);
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -99,13 +99,9 @@
</span><span class="cx"> #include &lt;JavaScriptCore/RemoteInspector.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(SOUP)
-#if ENABLE(CUSTOM_PROTOCOLS)
</del><ins>+#if USE(SOUP) &amp;&amp; ENABLE(CUSTOM_PROTOCOLS)
</ins><span class="cx"> #include &quot;WebSoupCustomProtocolRequestManager.h&quot;
</span><del>-#else
-#include &quot;WebSoupRequestManagerProxy.h&quot;
</del><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> #include &lt;wtf/RefCountedLeakCounter.h&gt;
</span><span class="lines">@@ -209,13 +205,9 @@
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx">     addSupplement&lt;WebDatabaseManagerProxy&gt;();
</span><span class="cx"> #endif
</span><del>-#if USE(SOUP)
-#if ENABLE(CUSTOM_PROTOCOLS)
</del><ins>+#if USE(SOUP) &amp;&amp; ENABLE(CUSTOM_PROTOCOLS)
</ins><span class="cx">     addSupplement&lt;WebSoupCustomProtocolRequestManager&gt;();
</span><del>-#else
-    addSupplement&lt;WebSoupRequestManagerProxy&gt;();
</del><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx"> #if ENABLE(BATTERY_STATUS)
</span><span class="cx">     addSupplement&lt;WebBatteryManagerProxy&gt;();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -113,10 +113,6 @@
</span><span class="cx"> #include &quot;ArgumentCodersGtk.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(SOUP) &amp;&amp; !ENABLE(CUSTOM_PROTOCOLS)
-#include &quot;WebSoupRequestManagerProxy.h&quot;
-#endif
-
</del><span class="cx"> #if ENABLE(VIBRATION)
</span><span class="cx"> #include &quot;WebVibrationProxy.h&quot;
</span><span class="cx"> #endif
</span><span class="lines">@@ -5043,13 +5039,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(SOUP) &amp;&amp; !ENABLE(CUSTOM_PROTOCOLS)
-void WebPageProxy::didReceiveURIRequest(String uriString, uint64_t requestID)
-{
-    m_process-&gt;context().supplement&lt;WebSoupRequestManagerProxy&gt;()-&gt;didReceiveURIRequest(uriString, this, requestID);
-}
-#endif
-
</del><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> void WebPageProxy::setComposition(const String&amp; text, Vector&lt;CompositionUnderline&gt; underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1253,10 +1253,6 @@
</span><span class="cx">     void notifyRevealedSelection();
</span><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx"> 
</span><del>-#if USE(SOUP) &amp;&amp; !ENABLE(CUSTOM_PROTOCOLS)
-    void didReceiveURIRequest(String uriString, uint64_t requestID);
-#endif
-
</del><span class="cx">     void clearLoadDependentCallbacks();
</span><span class="cx"> 
</span><span class="cx">     void performDragControllerAction(DragControllerAction, WebCore::DragData&amp;, const String&amp; dragStorageName, const SandboxExtension::Handle&amp;, const SandboxExtension::HandleArray&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -366,13 +366,6 @@
</span><span class="cx">     SaveRecentSearches(String name, Vector&lt;String&gt; searchItems)
</span><span class="cx">     LoadRecentSearches(String name) -&gt; (Vector&lt;String&gt; result)
</span><span class="cx"> 
</span><del>-#if USE(SOUP)
-#if !ENABLE(CUSTOM_PROTOCOLS)
-    # Soup custom URI request messages
-    DidReceiveURIRequest(String uriString, uint64_t requestID);
-#endif
-#endif
-
</del><span class="cx">     SavePDFToFileInDownloadsFolder(String suggestedFilename, String originatingURLString, IPC::DataReference data)
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerClientcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 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 &quot;config.h&quot;
-#include &quot;WebSoupRequestManagerClient.h&quot;
-
-#include &quot;WKAPICast.h&quot;
-
-namespace WebKit {
-
-bool WebSoupRequestManagerClient::didReceiveURIRequest(WebSoupRequestManagerProxy* soupRequestManager, API::URL* url, WebPageProxy* initiaingPage, uint64_t requestID)
-{
-    if (!m_client.didReceiveURIRequest)
-        return false;
-
-    m_client.didReceiveURIRequest(toAPI(soupRequestManager), toAPI(url), toAPI(initiaingPage), requestID, m_client.base.clientInfo);
-    return true;
-}
-
-void WebSoupRequestManagerClient::didFailToLoadURIRequest(WebSoupRequestManagerProxy* soupRequestManager, uint64_t requestID)
-{
-    if (m_client.didFailToLoadURIRequest)
-        m_client.didFailToLoadURIRequest(toAPI(soupRequestManager), requestID, m_client.base.clientInfo);
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerProxycpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,128 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * 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 &quot;config.h&quot;
-#include &quot;WebSoupRequestManagerProxy.h&quot;
-
-#include &quot;APIData.h&quot;
-#include &quot;WebContext.h&quot;
-#include &quot;WebSoupRequestManagerMessages.h&quot;
-#include &quot;WebSoupRequestManagerProxyMessages.h&quot;
-
-namespace WebKit {
-
-const char* WebSoupRequestManagerProxy::supplementName()
-{
-    return &quot;WebSoupRequestManagerProxy&quot;;
-}
-
-PassRefPtr&lt;WebSoupRequestManagerProxy&gt; WebSoupRequestManagerProxy::create(WebContext* context)
-{
-    return adoptRef(new WebSoupRequestManagerProxy(context));
-}
-
-WebSoupRequestManagerProxy::WebSoupRequestManagerProxy(WebContext* context)
-    : WebContextSupplement(context)
-    , m_loadFailed(false)
-{
-    WebContextSupplement::context()-&gt;addMessageReceiver(Messages::WebSoupRequestManagerProxy::messageReceiverName(), *this);
-}
-
-WebSoupRequestManagerProxy::~WebSoupRequestManagerProxy()
-{
-}
-
-void WebSoupRequestManagerProxy::initializeClient(const WKSoupRequestManagerClientBase* client)
-{
-    m_client.initialize(client);
-}
-
-// WebContextSupplement
-
-void WebSoupRequestManagerProxy::contextDestroyed()
-{
-}
-
-void WebSoupRequestManagerProxy::processDidClose(WebProcessProxy*)
-{
-}
-
-void WebSoupRequestManagerProxy::refWebContextSupplement()
-{
-    API::Object::ref();
-}
-
-void WebSoupRequestManagerProxy::derefWebContextSupplement()
-{
-    API::Object::deref();
-}
-
-void WebSoupRequestManagerProxy::registerURIScheme(const String&amp; scheme)
-{
-    if (!context())
-        return;
-
-    context()-&gt;sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebSoupRequestManager::RegisterURIScheme(scheme));
-
-    ASSERT(!m_registeredURISchemes.contains(scheme));
-    m_registeredURISchemes.append(scheme);
-}
-
-void WebSoupRequestManagerProxy::didHandleURIRequest(const API::Data* requestData, uint64_t contentLength, const String&amp; mimeType, uint64_t requestID)
-{
-    if (!context())
-        return;
-
-    context()-&gt;sendToAllProcesses(Messages::WebSoupRequestManager::DidHandleURIRequest(requestData-&gt;dataReference(), contentLength, mimeType, requestID));
-}
-
-void WebSoupRequestManagerProxy::didReceiveURIRequestData(const API::Data* requestData, uint64_t requestID)
-{
-    if (!context())
-        return;
-
-    if (m_loadFailed)
-        return;
-
-    context()-&gt;sendToAllProcesses(Messages::WebSoupRequestManager::DidReceiveURIRequestData(requestData-&gt;dataReference(), requestID));
-}
-
-void WebSoupRequestManagerProxy::didReceiveURIRequest(const String&amp; uriString, WebPageProxy* initiaingPage, uint64_t requestID)
-{
-    if (!m_client.didReceiveURIRequest(this, API::URL::create(uriString).get(), initiaingPage, requestID))
-        didHandleURIRequest(API::Data::create(0, 0).get(), 0, String(), requestID);
-}
-
-void WebSoupRequestManagerProxy::didFailToLoadURIRequest(uint64_t requestID)
-{
-    m_loadFailed = true;
-    m_client.didFailToLoadURIRequest(this, requestID);
-}
-
-void WebSoupRequestManagerProxy::didFailURIRequest(const WebCore::ResourceError&amp; error, uint64_t requestID)
-{
-    if (!context())
-        return;
-
-    m_loadFailed = true;
-    context()-&gt;sendToAllProcesses(Messages::WebSoupRequestManager::DidFailURIRequest(error, requestID));
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerProxymessagesin"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-# Copyright (C) 2012 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.
-
-messages -&gt; WebSoupRequestManagerProxy {
-    DidFailToLoadURIRequest(uint64_t requestID);
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -128,10 +128,6 @@
</span><span class="cx"> #include &lt;JavaScriptCore/RemoteInspector.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(SOUP) &amp;&amp; !ENABLE(CUSTOM_PROTOCOLS)
-#include &quot;WebSoupRequestManager.h&quot;
-#endif
-
</del><span class="cx"> using namespace JSC;
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="lines">@@ -204,9 +200,6 @@
</span><span class="cx"> #if ENABLE(BATTERY_STATUS)
</span><span class="cx">     addSupplement&lt;WebBatteryManager&gt;();
</span><span class="cx"> #endif
</span><del>-#if USE(SOUP) &amp;&amp; !ENABLE(CUSTOM_PROTOCOLS)
-    addSupplement&lt;WebSoupRequestManager&gt;();
-#endif
</del><span class="cx">     m_plugInAutoStartOriginHashes.add(SessionID::defaultSessionID(), HashMap&lt;unsigned, double&gt;());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebKitSoupRequestGenericcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -22,11 +22,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
-#include &quot;WebProcess.h&quot;
-#include &quot;WebSoupRequestManager.h&quot;
-#endif
-
</del><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><span class="cx"> G_DEFINE_TYPE(WebKitSoupRequestGeneric, webkit_soup_request_generic, SOUP_TYPE_REQUEST)
</span><span class="lines">@@ -55,8 +50,6 @@
</span><span class="cx">     CustomProtocolManagerImpl* customProtocolManager = WEBKIT_SOUP_REQUEST_GENERIC_GET_CLASS(request)-&gt;customProtocolManager;
</span><span class="cx">     ASSERT(customProtocolManager);
</span><span class="cx">     customProtocolManager-&gt;send(g_task_new(request, cancellable, callback, userData));
</span><del>-#else
-    WebProcess::shared().supplement&lt;WebSoupRequestManager&gt;()-&gt;send(g_task_new(request, cancellable, callback, userData));
</del><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -68,7 +61,7 @@
</span><span class="cx">     ASSERT(customProtocolManager);
</span><span class="cx">     return customProtocolManager-&gt;finish(G_TASK(result), error);
</span><span class="cx"> #else
</span><del>-    return WebProcess::shared().supplement&lt;WebSoupRequestManager&gt;()-&gt;finish(G_TASK(result), error);
</del><ins>+    return nullptr;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebProcessSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -44,10 +44,6 @@
</span><span class="cx"> #include &lt;wtf/gobject/GRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/gobject/GUniquePtr.h&gt;
</span><span class="cx"> 
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
-#include &quot;WebSoupRequestManager.h&quot;
-#endif
-
</del><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> static uint64_t getCacheDiskFreeSize(SoupCache* cache)
</span><span class="lines">@@ -170,11 +166,6 @@
</span><span class="cx">     if (!parameters.languages.isEmpty())
</span><span class="cx">         setSoupSessionAcceptLanguage(parameters.languages);
</span><span class="cx"> 
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
-    for (size_t i = 0; i &lt; parameters.urlSchemesRegistered.size(); i++)
-        supplement&lt;WebSoupRequestManager&gt;()-&gt;registerURIScheme(parameters.urlSchemesRegistered[i]);
-#endif
-
</del><span class="cx">     setIgnoreTLSErrors(parameters.ignoreTLSErrors);
</span><span class="cx"> 
</span><span class="cx">     WebCore::addLanguageChangeObserver(this, languageChanged);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebSoupRequestManagercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,194 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012, 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 &quot;config.h&quot;
-#include &quot;WebSoupRequestManager.h&quot;
-
-#include &quot;DataReference.h&quot;
-#include &quot;WebErrors.h&quot;
-#include &quot;WebKitSoupRequestGeneric.h&quot;
-#include &quot;WebKitSoupRequestInputStream.h&quot;
-#include &quot;WebPageProxyMessages.h&quot;
-#include &quot;WebProcess.h&quot;
-#include &quot;WebSoupRequestManagerMessages.h&quot;
-#include &quot;WebSoupRequestManagerProxyMessages.h&quot;
-#include &lt;WebCore/ResourceHandle.h&gt;
-#include &lt;WebCore/ResourceRequest.h&gt;
-#include &lt;WebCore/SoupNetworkSession.h&gt;
-#include &lt;wtf/gobject/GUniquePtr.h&gt;
-#include &lt;wtf/text/CString.h&gt;
-
-namespace WebKit {
-
-static uint64_t generateSoupRequestID()
-{
-    static uint64_t uniqueSoupRequestID = 1;
-    return uniqueSoupRequestID++;
-}
-
-struct WebSoupRequestAsyncData {
-    WebSoupRequestAsyncData(GTask* task, WebKitSoupRequestGeneric* requestGeneric)
-        : task(task)
-        , request(requestGeneric)
-        , cancellable(g_task_get_cancellable(task))
-    {
-        // If the struct contains a null request, it is because the request failed.
-        g_object_add_weak_pointer(G_OBJECT(request), reinterpret_cast&lt;void**&gt;(&amp;request));
-    }
-
-    ~WebSoupRequestAsyncData()
-    {
-        if (request)
-            g_object_remove_weak_pointer(G_OBJECT(request), reinterpret_cast&lt;void**&gt;(&amp;request));
-    }
-
-    bool requestFailed()
-    {
-        return g_cancellable_is_cancelled(cancellable.get()) || !request;
-    }
-
-    GRefPtr&lt;GTask&gt; releaseTask()
-    {
-        GTask* returnValue = task;
-        task = 0;
-        return adoptGRef(returnValue);
-    }
-
-    GTask* task;
-    WebKitSoupRequestGeneric* request;
-    GRefPtr&lt;GCancellable&gt; cancellable;
-    GRefPtr&lt;GInputStream&gt; stream;
-};
-
-const char* WebSoupRequestManager::supplementName()
-{
-    return &quot;WebSoupRequestManager&quot;;
-}
-
-WebSoupRequestManager::WebSoupRequestManager(WebProcess* process)
-    : m_process(process)
-    , m_schemes(adoptGRef(g_ptr_array_new_with_free_func(g_free)))
-{
-    m_process-&gt;addMessageReceiver(Messages::WebSoupRequestManager::messageReceiverName(), *this);
-}
-
-WebSoupRequestManager::~WebSoupRequestManager()
-{
-}
-
-void WebSoupRequestManager::registerURIScheme(const String&amp; scheme)
-{
-    if (m_schemes-&gt;len)
-        g_ptr_array_remove_index_fast(m_schemes.get(), m_schemes-&gt;len - 1);
-    g_ptr_array_add(m_schemes.get(), g_strdup(scheme.utf8().data()));
-    g_ptr_array_add(m_schemes.get(), 0);
-
-    SoupSession* session = WebCore::SoupNetworkSession::defaultSession().soupSession();
-    SoupRequestClass* genericRequestClass = static_cast&lt;SoupRequestClass*&gt;(g_type_class_ref(WEBKIT_TYPE_SOUP_REQUEST_GENERIC));
-    genericRequestClass-&gt;schemes = const_cast&lt;const char**&gt;(reinterpret_cast&lt;char**&gt;(m_schemes-&gt;pdata));
-    soup_session_add_feature_by_type(session, WEBKIT_TYPE_SOUP_REQUEST_GENERIC);
-}
-
-void WebSoupRequestManager::didHandleURIRequest(const IPC::DataReference&amp; requestData, uint64_t contentLength, const String&amp; mimeType, uint64_t requestID)
-{
-    WebSoupRequestAsyncData* data = m_requestMap.get(requestID);
-    ASSERT(data);
-    GRefPtr&lt;GTask&gt; task = data-&gt;releaseTask();
-    ASSERT(task.get());
-
-    WebKitSoupRequestGeneric* request = WEBKIT_SOUP_REQUEST_GENERIC(g_task_get_source_object(task.get()));
-    webkitSoupRequestGenericSetContentLength(request, contentLength ? contentLength : -1);
-    webkitSoupRequestGenericSetContentType(request, !mimeType.isEmpty() ? mimeType.utf8().data() : 0);
-
-    GInputStream* dataStream;
-    if (!requestData.size()) {
-        // Empty reply, just create and empty GMemoryInputStream.
-        dataStream = g_memory_input_stream_new();
-        m_requestMap.remove(requestID);
-    } else if (requestData.size() == contentLength) {
-        // We don't expect more data, so we can just create a GMemoryInputStream with all the data.
-        dataStream = g_memory_input_stream_new_from_data(g_memdup(requestData.data(), requestData.size()), contentLength, g_free);
-        m_requestMap.remove(requestID);
-    } else {
-        // We expect more data chunks from the UI process.
-        dataStream = webkitSoupRequestInputStreamNew(contentLength);
-        data-&gt;stream = dataStream;
-        webkitSoupRequestInputStreamAddData(WEBKIT_SOUP_REQUEST_INPUT_STREAM(dataStream), requestData.data(), requestData.size());
-    }
-    g_task_return_pointer(task.get(), dataStream, g_object_unref);
-}
-
-void WebSoupRequestManager::didReceiveURIRequestData(const IPC::DataReference&amp; requestData, uint64_t requestID)
-{
-    WebSoupRequestAsyncData* data = m_requestMap.get(requestID);
-    // 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;
-    ASSERT(data-&gt;stream.get());
-
-    if (data-&gt;requestFailed()) {
-        // 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-&gt;stream.get())))
-            m_process-&gt;parentProcessConnection()-&gt;send(Messages::WebSoupRequestManagerProxy::DidFailToLoadURIRequest(requestID), 0);
-        m_requestMap.remove(requestID);
-
-        return;
-    }
-
-    webkitSoupRequestInputStreamAddData(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data-&gt;stream.get()), requestData.data(), requestData.size());
-    if (webkitSoupRequestInputStreamFinished(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data-&gt;stream.get())))
-        m_requestMap.remove(requestID);
-}
-
-void WebSoupRequestManager::didFailURIRequest(const WebCore::ResourceError&amp; error, uint64_t requestID)
-{
-    WebSoupRequestAsyncData* data = m_requestMap.get(requestID);
-    ASSERT(data);
-    GRefPtr&lt;GTask&gt; task = data-&gt;releaseTask();
-    ASSERT(task.get());
-
-    g_task_return_new_error(task.get(), g_quark_from_string(error.domain().utf8().data()),
-        error.errorCode(), &quot;%s&quot;, error.localizedDescription().utf8().data());
-    m_requestMap.remove(requestID);
-}
-
-void WebSoupRequestManager::send(GTask* task)
-{
-    WebKitSoupRequestGeneric* request = WEBKIT_SOUP_REQUEST_GENERIC(g_task_get_source_object(task));
-    SoupRequest* soupRequest = SOUP_REQUEST(request);
-    GUniquePtr&lt;char&gt; uriString(soup_uri_to_string(soup_request_get_uri(soupRequest), FALSE));
-
-    uint64_t requestID = generateSoupRequestID();
-    m_requestMap.set(requestID, std::make_unique&lt;WebSoupRequestAsyncData&gt;(task, request));
-
-    uint64_t initiatingPageID = WebCore::ResourceRequest(soupRequest).initiatingPageID();
-    m_process-&gt;parentProcessConnection()-&gt;send(Messages::WebPageProxy::DidReceiveURIRequest(String::fromUTF8(uriString.get()), requestID), initiatingPageID);
-}
-
-GInputStream* WebSoupRequestManager::finish(GTask* task, GError** error)
-{
-    gpointer inputStream = g_task_propagate_pointer(task, error);
-    return inputStream ? G_INPUT_STREAM(inputStream) : 0;
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebSoupRequestManagermessagesin"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,28 +0,0 @@
</span><del>-# Copyright (C) 2012 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.
-
-messages -&gt; WebSoupRequestManager {
-    RegisterURIScheme(String uriScheme);
-    DidHandleURIRequest(IPC::DataReference requestData, uint64_t contentLength, String mimeType, uint64_t requestID);
-    DidReceiveURIRequestData(IPC::DataReference requestData, uint64_t requestID);
-    DidFailURIRequest(WebCore::ResourceError error, uint64_t requestID);
-}
</del></span></pre>
</div>
</div>

</body>
</html>