<!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>[172927] 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/172927">172927</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2014-08-25 11:04:39 -0700 (Mon, 25 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove load scheduling code from network process
https://bugs.webkit.org/show_bug.cgi?id=136199

Reviewed by Darin Adler.

Most platforms just flush resource loads directly to the networking layer by
making the parallel load count large. Also we always pass ResourceLoadPriorityHighest
to the scheduler so no actual scheduling happens. This is effectively dead code.

Keep basic support for serializing loads. This is only used for testing.

* NetworkProcess/HostRecord.cpp: Removed.
* NetworkProcess/HostRecord.h: Removed.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::servePendingRequests):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::getNetworkProcessStatistics):
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
(WebKit::NetworkResourceLoadScheduler::scheduleLoader):
(WebKit::NetworkResourceLoadScheduler::removeLoader):
(WebKit::NetworkResourceLoadScheduler::loadsPendingCount):
(WebKit::NetworkResourceLoadScheduler::loadsActiveCount):
(WebKit::NetworkResourceLoadScheduler::scheduleServePendingRequests): Deleted.
(WebKit::NetworkResourceLoadScheduler::requestTimerFired): Deleted.
(WebKit::NetworkResourceLoadScheduler::hostForURL): Deleted.
(WebKit::NetworkResourceLoadScheduler::receivedRedirect): Deleted.
(WebKit::NetworkResourceLoadScheduler::servePendingRequests): Deleted.
(WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): Deleted.
(WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): Deleted.
(WebKit::NetworkResourceLoadScheduler::hostsPendingCount): Deleted.
(WebKit::NetworkResourceLoadScheduler::hostsActiveCount): Deleted.
* NetworkProcess/NetworkResourceLoadScheduler.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::isLoadingMainResource):
(WebKit::NetworkResourceLoader::setHostRecord): Deleted.
(WebKit::NetworkResourceLoader::hostRecord): Deleted.
* NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
(WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
* NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp:
(WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
* WebKit2.xcodeproj/project.pbxproj:</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="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadSchedulercpp">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadSchedulerh">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessmacNetworkResourceLoadSchedulerMacmm">trunk/Source/WebKit2/NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcesssoupNetworkResourceLoadSchedulerSoupcpp">trunk/Source/WebKit2/NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2NetworkProcessHostRecordcpp">trunk/Source/WebKit2/NetworkProcess/HostRecord.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessHostRecordh">trunk/Source/WebKit2/NetworkProcess/HostRecord.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/CMakeLists.txt        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -146,7 +146,6 @@
</span><span class="cx"> 
</span><span class="cx"> set(WebKit2_SOURCES
</span><span class="cx">     NetworkProcess/AsynchronousNetworkLoaderClient.cpp
</span><del>-    NetworkProcess/HostRecord.cpp
</del><span class="cx">     NetworkProcess/NetworkConnectionToWebProcess.cpp
</span><span class="cx">     NetworkProcess/NetworkProcess.cpp
</span><span class="cx">     NetworkProcess/NetworkProcessPlatformStrategies.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/ChangeLog        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2014-08-25  Antti Koivisto  &lt;antti@apple.com&gt;
+
+        Remove load scheduling code from network process
+        https://bugs.webkit.org/show_bug.cgi?id=136199
+
+        Reviewed by Darin Adler.
+
+        Most platforms just flush resource loads directly to the networking layer by
+        making the parallel load count large. Also we always pass ResourceLoadPriorityHighest
+        to the scheduler so no actual scheduling happens. This is effectively dead code.
+
+        Keep basic support for serializing loads. This is only used for testing.
+
+        * NetworkProcess/HostRecord.cpp: Removed.
+        * NetworkProcess/HostRecord.h: Removed.
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::servePendingRequests):
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::getNetworkProcessStatistics):
+        * NetworkProcess/NetworkResourceLoadScheduler.cpp:
+        (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
+        (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
+        (WebKit::NetworkResourceLoadScheduler::removeLoader):
+        (WebKit::NetworkResourceLoadScheduler::loadsPendingCount):
+        (WebKit::NetworkResourceLoadScheduler::loadsActiveCount):
+        (WebKit::NetworkResourceLoadScheduler::scheduleServePendingRequests): Deleted.
+        (WebKit::NetworkResourceLoadScheduler::requestTimerFired): Deleted.
+        (WebKit::NetworkResourceLoadScheduler::hostForURL): Deleted.
+        (WebKit::NetworkResourceLoadScheduler::receivedRedirect): Deleted.
+        (WebKit::NetworkResourceLoadScheduler::servePendingRequests): Deleted.
+        (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): Deleted.
+        (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): Deleted.
+        (WebKit::NetworkResourceLoadScheduler::hostsPendingCount): Deleted.
+        (WebKit::NetworkResourceLoadScheduler::hostsActiveCount): Deleted.
+        * NetworkProcess/NetworkResourceLoadScheduler.h:
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
+        (WebKit::NetworkResourceLoader::cleanup):
+        (WebKit::NetworkResourceLoader::continueWillSendRequest):
+        * NetworkProcess/NetworkResourceLoader.h:
+        (WebKit::NetworkResourceLoader::isLoadingMainResource):
+        (WebKit::NetworkResourceLoader::setHostRecord): Deleted.
+        (WebKit::NetworkResourceLoader::hostRecord): Deleted.
+        * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
+        (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
+        (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
+        * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp:
+        (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
+        (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
+        * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2014-08-25  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Older versions of WebKit should use the plugins cache in read only mode
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessHostRecordcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/NetworkProcess/HostRecord.cpp (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/HostRecord.cpp        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/HostRecord.cpp        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -1,230 +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.
- */
-
-#include &quot;config.h&quot;
-#include &quot;HostRecord.h&quot;
-
-#include &quot;Logging.h&quot;
-#include &quot;NetworkConnectionToWebProcess.h&quot;
-#include &quot;NetworkProcess.h&quot;
-#include &quot;NetworkResourceLoadParameters.h&quot;
-#include &quot;NetworkResourceLoadScheduler.h&quot;
-#include &quot;NetworkResourceLoader.h&quot;
-#include &lt;wtf/MainThread.h&gt;
-
-#if ENABLE(NETWORK_PROCESS)
-
-using namespace WebCore;
-
-namespace WebKit {
-
-HostRecord::HostRecord(const String&amp; name, int maxRequestsInFlight)
-    : m_name(name)
-    , m_maxRequestsInFlight(maxRequestsInFlight)
-{
-}
-
-HostRecord::~HostRecord()
-{
-#ifndef NDEBUG
-    ASSERT(m_loadersInProgress.isEmpty());
-    for (unsigned p = 0; p &lt;= ResourceLoadPriorityHighest; p++)
-        ASSERT(m_loadersPending[p].isEmpty());
-#endif
-}
-
-void HostRecord::scheduleResourceLoader(PassRefPtr&lt;NetworkResourceLoader&gt; loader)
-{
-    ASSERT(RunLoop::isMain());
-
-    loader-&gt;setHostRecord(this);
-    
-    if (loader-&gt;isSynchronous())
-        m_syncLoadersPending.append(loader);
-    else
-        m_loadersPending[loader-&gt;priority()].append(loader);
-}
-
-void HostRecord::addLoaderInProgress(NetworkResourceLoader* loader)
-{
-    ASSERT(RunLoop::isMain());
-
-    m_loadersInProgress.add(loader);
-    loader-&gt;setHostRecord(this);
-}
-
-inline bool removeLoaderFromQueue(NetworkResourceLoader* loader, LoaderQueue&amp; queue)
-{
-    LoaderQueue::iterator end = queue.end();
-    for (LoaderQueue::iterator it = queue.begin(); it != end; ++it) {
-        if (it-&gt;get() == loader) {
-            loader-&gt;setHostRecord(0);
-            queue.remove(it);
-            return true;
-        }
-    }
-    return false;
-}
-
-void HostRecord::removeLoader(NetworkResourceLoader* loader)
-{
-    ASSERT(RunLoop::isMain());
-
-    // FIXME (NetworkProcess): Due to IPC race conditions, it's possible this HostRecord will be asked to remove the same loader twice.
-    // It would be nice to know the loader has already been removed and treat it as a no-op.
-
-    NetworkResourceLoaderSet::iterator i = m_loadersInProgress.find(loader);
-    if (i != m_loadersInProgress.end()) {
-        i-&gt;get()-&gt;setHostRecord(0);
-        m_loadersInProgress.remove(i);
-        return;
-    }
-
-    if (removeLoaderFromQueue(loader, m_syncLoadersPending))
-        return;
-    
-    for (int priority = ResourceLoadPriorityHighest; priority &gt;= ResourceLoadPriorityLowest; --priority) {
-        if (removeLoaderFromQueue(loader, m_loadersPending[priority]))
-            return;
-    }
-}
-
-bool HostRecord::hasRequests() const
-{
-    if (!m_loadersInProgress.isEmpty())
-        return true;
-
-    for (unsigned p = 0; p &lt;= ResourceLoadPriorityHighest; p++) {
-        if (!m_loadersPending[p].isEmpty())
-            return true;
-    }
-
-    return false;
-}
-
-uint64_t HostRecord::pendingRequestCount() const
-{
-    uint64_t count = 0;
-
-    for (unsigned p = 0; p &lt;= ResourceLoadPriorityHighest; p++)
-        count += m_loadersPending[p].size();
-
-    return count;
-}
-
-uint64_t HostRecord::activeLoadCount() const
-{
-    return m_loadersInProgress.size();
-}
-
-void HostRecord::servePendingRequestsForQueue(LoaderQueue&amp; queue, ResourceLoadPriority priority)
-{
-    // We only enforce the connection limit for http(s) hosts, which are the only ones with names.
-    bool shouldLimitRequests = !name().isNull();
-
-    // For non-named hosts - everything but http(s) - we should only enforce the limit if the document
-    // isn't done parsing and we don't know all stylesheets yet.
-
-    // FIXME (NetworkProcess): The above comment about document parsing and stylesheets is a holdover
-    // from the WebCore::ResourceLoadScheduler.
-    // The behavior described was at one time important for WebCore's single threadedness.
-    // It's possible that we don't care about it with the NetworkProcess.
-    // We should either decide it's not important and change the above comment, or decide it is
-    // still important and somehow account for it.
-    
-    // Very low priority loaders are only handled when no other loaders are in progress.
-    if (shouldLimitRequests &amp;&amp; priority == ResourceLoadPriorityVeryLow &amp;&amp; !m_loadersInProgress.isEmpty())
-        return;
-    
-    while (!queue.isEmpty()) {
-        RefPtr&lt;NetworkResourceLoader&gt; loader = queue.first();
-        ASSERT(loader-&gt;hostRecord() == this);
-
-        // This request might be from WebProcess we've lost our connection to.
-        // If so we should just skip it.
-        if (!loader-&gt;connectionToWebProcess()) {
-            removeLoader(loader.get());
-            continue;
-        }
-
-        if (shouldLimitRequests &amp;&amp; limitsRequests(priority, loader.get()))
-            return;
-
-        m_loadersInProgress.add(loader);
-        queue.removeFirst();
-
-        LOG(NetworkScheduling, &quot;(NetworkProcess) HostRecord::servePendingRequestsForQueue - Starting load of %s\n&quot;, loader-&gt;request().url().string().utf8().data());
-        loader-&gt;start();
-    }
-}
-
-void HostRecord::servePendingRequests(ResourceLoadPriority minimumPriority)
-{
-    LOG(NetworkScheduling, &quot;(NetworkProcess) HostRecord::servePendingRequests Host name='%s'&quot;, name().utf8().data());
-
-    // We serve synchronous requests before any other requests to improve responsiveness in any
-    // WebProcess that is waiting on a synchronous load.
-    servePendingRequestsForQueue(m_syncLoadersPending, ResourceLoadPriorityHighest);
-    
-    for (int priority = ResourceLoadPriorityHighest; priority &gt;= minimumPriority; --priority)
-        servePendingRequestsForQueue(m_loadersPending[priority], (ResourceLoadPriority)priority);
-}
-
-bool HostRecord::limitsRequests(ResourceLoadPriority priority, NetworkResourceLoader* loader) const
-{
-    ASSERT(loader);
-    ASSERT(loader-&gt;connectionToWebProcess());
-
-    if (priority == ResourceLoadPriorityVeryLow &amp;&amp; !m_loadersInProgress.isEmpty())
-        return true;
-
-    if (loader-&gt;connectionToWebProcess()-&gt;isSerialLoadingEnabled() &amp;&amp; m_loadersInProgress.size() &gt;= 1)
-        return true;
-
-    // If we're exactly at the limit for requests in flight, and this loader is asynchronous, then we're done serving new requests.
-    // The synchronous loader exception handles the case where a sync XHR is made while 6 other requests are already in flight.
-    if (m_loadersInProgress.size() == m_maxRequestsInFlight &amp;&amp; !loader-&gt;isSynchronous())
-        return true;
-
-    // If we're already past the limit of the number of loaders in flight, we won't even serve new synchronous requests right now.
-    if (m_loadersInProgress.size() &gt; m_maxRequestsInFlight) {
-#ifndef NDEBUG
-        // If we have more loaders in progress than we should, at least one of them had better be synchronous.
-        NetworkResourceLoaderSet::iterator i = m_loadersInProgress.begin();
-        NetworkResourceLoaderSet::iterator end = m_loadersInProgress.end();
-        for (; i != end; ++i) {
-            if (i-&gt;get()-&gt;isSynchronous())
-                break;
-        }
-        ASSERT(i != end);
-#endif
-        return true;
-    }
-    return false;
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(NETWORK_PROCESS)
</del></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessHostRecordh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/NetworkProcess/HostRecord.h (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/HostRecord.h        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/HostRecord.h        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -1,84 +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 HostRecord_h
-#define HostRecord_h
-
-#if ENABLE(NETWORK_PROCESS)
-
-#include &lt;WebCore/ResourceLoadPriority.h&gt;
-#include &lt;wtf/Deque.h&gt;
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebKit {
-
-class NetworkResourceLoader;
-
-typedef Deque&lt;RefPtr&lt;NetworkResourceLoader&gt;&gt; LoaderQueue;
-typedef uint64_t ResourceLoadIdentifier;
-
-class HostRecord : public RefCounted&lt;HostRecord&gt; {
-public:
-    static PassRefPtr&lt;HostRecord&gt; create(const String&amp; name, int maxRequestsInFlight)
-    {
-        return adoptRef(new HostRecord(name, maxRequestsInFlight));
-    }
-    
-    ~HostRecord();
-    
-    const String&amp; name() const { return m_name; }
-    
-    void scheduleResourceLoader(PassRefPtr&lt;NetworkResourceLoader&gt;);
-    void addLoaderInProgress(NetworkResourceLoader*);
-    void removeLoader(NetworkResourceLoader*);
-    bool hasRequests() const;
-    void servePendingRequests(WebCore::ResourceLoadPriority);
-
-    uint64_t pendingRequestCount() const;
-    uint64_t activeLoadCount() const;
-
-private:
-    HostRecord(const String&amp; name, int maxRequestsInFlight);
-
-    void servePendingRequestsForQueue(LoaderQueue&amp;, WebCore::ResourceLoadPriority);
-    bool limitsRequests(WebCore::ResourceLoadPriority, NetworkResourceLoader*) const;
-
-    LoaderQueue m_loadersPending[WebCore::ResourceLoadPriorityHighest + 1];
-    LoaderQueue m_syncLoadersPending;
-
-    typedef HashSet&lt;RefPtr&lt;NetworkResourceLoader&gt;&gt; NetworkResourceLoaderSet;
-    NetworkResourceLoaderSet m_loadersInProgress;
-
-    const String m_name;
-    int m_maxRequestsInFlight;
-};
-
-} // namespace WebKit
-
-#endif // ENABLE(NETWORK_PROCESS)
-
-#endif // #ifndef HostRecord_h
</del></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -145,9 +145,8 @@
</span><span class="cx">     loader-&gt;setDefersLoading(defers);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkConnectionToWebProcess::servePendingRequests(uint32_t resourceLoadPriority)
</del><ins>+void NetworkConnectionToWebProcess::servePendingRequests(uint32_t)
</ins><span class="cx"> {
</span><del>-    NetworkProcess::shared().networkResourceLoadScheduler().servePendingRequests(static_cast&lt;ResourceLoadPriority&gt;(resourceLoadPriority));
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkConnectionToWebProcess::setSerialLoadingEnabled(bool enabled)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -258,8 +258,6 @@
</span><span class="cx"> 
</span><span class="cx">     StatisticsData data;
</span><span class="cx"> 
</span><del>-    data.statisticsNumbers.set(&quot;HostsPendingCount&quot;, scheduler.hostsPendingCount());
-    data.statisticsNumbers.set(&quot;HostsActiveCount&quot;, scheduler.hostsActiveCount());
</del><span class="cx">     data.statisticsNumbers.set(&quot;LoadsPendingCount&quot;, scheduler.loadsPendingCount());
</span><span class="cx">     data.statisticsNumbers.set(&quot;LoadsActiveCount&quot;, scheduler.loadsActiveCount());
</span><span class="cx">     data.statisticsNumbers.set(&quot;DownloadsActiveCount&quot;, shared().downloadManager().activeDownloadCount());
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadSchedulercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.cpp (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.cpp        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.cpp        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;NetworkResourceLoadScheduler.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;HostRecord.h&quot;
</del><span class="cx"> #include &quot;Logging.h&quot;
</span><ins>+#include &quot;NetworkConnectionToWebProcess.h&quot;
</ins><span class="cx"> #include &quot;NetworkProcess.h&quot;
</span><span class="cx"> #include &quot;NetworkResourceLoadParameters.h&quot;
</span><span class="cx"> #include &quot;NetworkResourceLoader.h&quot;
</span><span class="lines">@@ -15,211 +15,51 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-static const unsigned maxRequestsInFlightForNonHTTPProtocols = 20;
-
</del><span class="cx"> NetworkResourceLoadScheduler::NetworkResourceLoadScheduler()
</span><del>-    : m_nonHTTPProtocolHost(HostRecord::create(String(), maxRequestsInFlightForNonHTTPProtocols))
-    , m_requestTimer(this, &amp;NetworkResourceLoadScheduler::requestTimerFired)
-
</del><span class="cx"> {
</span><del>-    platformInitializeMaximumHTTPConnectionCountPerHost();
</del><ins>+    platformInitializeNetworkSettings();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkResourceLoadScheduler::scheduleServePendingRequests()
-{
-    if (!m_requestTimer.isActive())
-        m_requestTimer.startOneShot(0);
-}
-
-void NetworkResourceLoadScheduler::requestTimerFired(WebCore::Timer&lt;NetworkResourceLoadScheduler&gt;*)
-{
-    servePendingRequests();
-}
-
</del><span class="cx"> void NetworkResourceLoadScheduler::scheduleLoader(PassRefPtr&lt;NetworkResourceLoader&gt; loader)
</span><span class="cx"> {
</span><del>-    ResourceLoadPriority priority = loader-&gt;priority();
-    const ResourceRequest&amp; resourceRequest = loader-&gt;request();
-        
-    LOG(NetworkScheduling, &quot;(NetworkProcess) NetworkResourceLoadScheduler::scheduleLoader resource '%s'&quot;, resourceRequest.url().string().utf8().data());
-
-    HostRecord* host = hostForURL(resourceRequest.url(), CreateIfNotFound);
-    bool hadRequests = host-&gt;hasRequests();
-    host-&gt;scheduleResourceLoader(loader);
-
-    if (priority &gt; ResourceLoadPriorityLow || !resourceRequest.url().protocolIsInHTTPFamily() || (priority == ResourceLoadPriorityLow &amp;&amp; !hadRequests)) {
-        // Try to request important resources immediately.
-        host-&gt;servePendingRequests(priority);
-        return;
-    }
-    
-    // Handle asynchronously so early low priority requests don't get scheduled before later high priority ones.
-    scheduleServePendingRequests();
-}
-
-HostRecord* NetworkResourceLoadScheduler::hostForURL(const WebCore::URL&amp; url, CreateHostPolicy createHostPolicy)
-{
-    if (!url.protocolIsInHTTPFamily())
-        return m_nonHTTPProtocolHost.get();
-
-    m_hosts.checkConsistency();
-    String hostName = url.host();
-    HostRecord* host = m_hosts.get(hostName);
-    if (!host &amp;&amp; createHostPolicy == CreateIfNotFound) {
-        RefPtr&lt;HostRecord&gt; newHost = HostRecord::create(hostName, m_maxRequestsInFlightPerHost);
-        host = newHost.get();
-        m_hosts.add(hostName, newHost.release());
-    }
-    
-    return host;
-}
-
-void NetworkResourceLoadScheduler::removeLoader(NetworkResourceLoader* loader)
-{
</del><span class="cx">     ASSERT(RunLoop::isMain());
</span><del>-    ASSERT(loader);
</del><span class="cx"> 
</span><del>-    LOG(NetworkScheduling, &quot;(NetworkProcess) NetworkResourceLoadScheduler::removeLoadIdentifier removing loader %s&quot;, loader-&gt;request().url().string().utf8().data());
</del><ins>+    LOG(NetworkScheduling, &quot;(NetworkProcess) NetworkResourceLoadScheduler::scheduleLoader resource '%s'&quot;, loader-&gt;request().url().string().utf8().data());
</ins><span class="cx"> 
</span><del>-    HostRecord* host = loader-&gt;hostRecord();
-    
-    // Due to a race condition the WebProcess might have messaged the NetworkProcess to remove this identifier
-    // after the NetworkProcess has already removed it internally.
-    // In this situation we might not have a HostRecord to clean up.
-    if (host)
-        host-&gt;removeLoader(loader);
-
-    scheduleServePendingRequests();
-}
-
-void NetworkResourceLoadScheduler::receivedRedirect(NetworkResourceLoader* loader, const WebCore::URL&amp; redirectURL)
-{
-    ASSERT(RunLoop::isMain());
-    LOG(NetworkScheduling, &quot;(NetworkProcess) NetworkResourceLoadScheduler::receivedRedirect loader originally for '%s' redirected to '%s'&quot;, loader-&gt;request().url().string().utf8().data(), redirectURL.string().utf8().data());
-
-    HostRecord* oldHost = loader-&gt;hostRecord();
-
-    // The load may have been cancelled while the message was in flight from network thread to main thread.
-    if (!oldHost)
</del><ins>+    // This request might be from WebProcess we've lost our connection to.
+    // If so we should just skip it.
+    if (!loader-&gt;connectionToWebProcess())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    HostRecord* newHost = hostForURL(redirectURL, CreateIfNotFound);
-    
-    if (oldHost-&gt;name() == newHost-&gt;name())
</del><ins>+    if (loader-&gt;connectionToWebProcess()-&gt;isSerialLoadingEnabled() &amp;&amp; !m_activeLoaders.isEmpty()) {
+        m_pendingSerialLoaders.append(loader);
</ins><span class="cx">         return;
</span><ins>+    }
+    m_activeLoaders.add(loader.get());
</ins><span class="cx"> 
</span><del>-    oldHost-&gt;removeLoader(loader);
-    newHost-&gt;addLoaderInProgress(loader);
</del><ins>+    loader-&gt;start();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkResourceLoadScheduler::servePendingRequests(ResourceLoadPriority minimumPriority)
</del><ins>+void NetworkResourceLoadScheduler::removeLoader(NetworkResourceLoader* loader)
</ins><span class="cx"> {
</span><del>-    LOG(NetworkScheduling, &quot;(NetworkProcess) NetworkResourceLoadScheduler::servePendingRequests Serving requests for up to %i hosts with minimum priority %i&quot;, m_hosts.size(), minimumPriority);
-
-    m_requestTimer.stop();
-    
-    m_nonHTTPProtocolHost-&gt;servePendingRequests(minimumPriority);
-
-    m_hosts.checkConsistency();
-    Vector&lt;RefPtr&lt;HostRecord&gt;&gt; hostsToServe;
-    copyValuesToVector(m_hosts, hostsToServe);
-
-    size_t size = hostsToServe.size();
-    for (size_t i = 0; i &lt; size; ++i) {
-        HostRecord* host = hostsToServe[i].get();
-        if (host-&gt;hasRequests())
-            host-&gt;servePendingRequests(minimumPriority);
-        else
-            m_hosts.remove(host-&gt;name());
-    }
-}
-
-static bool removeScheduledLoadersCalled = false;
-
-void NetworkResourceLoadScheduler::removeScheduledLoaders(void* context)
-{
</del><span class="cx">     ASSERT(RunLoop::isMain());
</span><del>-    ASSERT(removeScheduledLoadersCalled);
</del><span class="cx"> 
</span><del>-    NetworkResourceLoadScheduler* scheduler = static_cast&lt;NetworkResourceLoadScheduler*&gt;(context);
-    scheduler-&gt;removeScheduledLoaders();
-}
</del><ins>+    LOG(NetworkScheduling, &quot;(NetworkProcess) NetworkResourceLoadScheduler::removeLoader resource '%s'&quot;, loader-&gt;request().url().string().utf8().data());
</ins><span class="cx"> 
</span><del>-void NetworkResourceLoadScheduler::removeScheduledLoaders()
-{
-    Vector&lt;RefPtr&lt;NetworkResourceLoader&gt;&gt; loadersToRemove;
-    {
-        MutexLocker locker(m_loadersToRemoveMutex);
-        loadersToRemove = m_loadersToRemove;
-        m_loadersToRemove.clear();
-        removeScheduledLoadersCalled = false;
-    }
-    
-    for (size_t i = 0; i &lt; loadersToRemove.size(); ++i)
-        removeLoader(loadersToRemove[i].get());
-}
</del><ins>+    m_activeLoaders.remove(loader);
</ins><span class="cx"> 
</span><del>-void NetworkResourceLoadScheduler::scheduleRemoveLoader(NetworkResourceLoader* loader)
-{
-    MutexLocker locker(m_loadersToRemoveMutex);
-    
-    m_loadersToRemove.append(loader);
-    
-    if (!removeScheduledLoadersCalled) {
-        removeScheduledLoadersCalled = true;
-        callOnMainThread(NetworkResourceLoadScheduler::removeScheduledLoaders, this);
-    }
</del><ins>+    while (!m_pendingSerialLoaders.isEmpty() &amp;&amp; m_activeLoaders.isEmpty())
+        scheduleLoader(m_pendingSerialLoaders.takeLast());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t NetworkResourceLoadScheduler::hostsPendingCount() const
-{
-    uint64_t count = m_nonHTTPProtocolHost-&gt;pendingRequestCount() ? 1 : 0;
-
-    HostMap::const_iterator end = m_hosts.end();
-    for (HostMap::const_iterator i = m_hosts.begin(); i != end; ++i) {
-        if (i-&gt;value-&gt;pendingRequestCount())
-            ++count;
-    }
-
-    return count;
-}
-
</del><span class="cx"> uint64_t NetworkResourceLoadScheduler::loadsPendingCount() const
</span><span class="cx"> {
</span><del>-    uint64_t count = m_nonHTTPProtocolHost-&gt;pendingRequestCount();
-
-    HostMap::const_iterator end = m_hosts.end();
-    for (HostMap::const_iterator i = m_hosts.begin(); i != end; ++i)
-        count += i-&gt;value-&gt;pendingRequestCount();
-
-    return count;
</del><ins>+    return m_pendingSerialLoaders.size();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-uint64_t NetworkResourceLoadScheduler::hostsActiveCount() const
-{
-    uint64_t count = 0;
-
-    if (m_nonHTTPProtocolHost-&gt;activeLoadCount())
-        count = 1;
-
-    HostMap::const_iterator end = m_hosts.end();
-    for (HostMap::const_iterator i = m_hosts.begin(); i != end; ++i) {
-        if (i-&gt;value-&gt;activeLoadCount())
-            ++count;
-    }
-
-    return count;
-}
-
</del><span class="cx"> uint64_t NetworkResourceLoadScheduler::loadsActiveCount() const
</span><span class="cx"> {
</span><del>-    uint64_t count = m_nonHTTPProtocolHost-&gt;activeLoadCount();
-
-    HostMap::const_iterator end = m_hosts.end();
-    for (HostMap::const_iterator i = m_hosts.begin(); i != end; ++i)
-        count += i-&gt;value-&gt;activeLoadCount();
-
-    return count;
</del><ins>+    return m_activeLoaders.size();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadSchedulerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.h (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.h        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.h        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -26,21 +26,14 @@
</span><span class="cx"> #ifndef NetworkResourceLoadScheduler_h
</span><span class="cx"> #define NetworkResourceLoadScheduler_h
</span><span class="cx"> 
</span><del>-#include &lt;WebCore/ResourceLoadPriority.h&gt;
</del><span class="cx"> #include &lt;WebCore/Timer.h&gt;
</span><del>-#include &lt;wtf/HashMap.h&gt;
</del><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringHash.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx"> 
</span><del>-namespace WebCore {
-class URL;
-}
-
</del><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-class HostRecord;
</del><span class="cx"> class NetworkResourceLoader;
</span><span class="cx"> 
</span><span class="cx"> class NetworkResourceLoadScheduler {
</span><span class="lines">@@ -49,56 +42,18 @@
</span><span class="cx"> public:
</span><span class="cx">     NetworkResourceLoadScheduler();
</span><span class="cx">     
</span><del>-    // Adds the request to the queue for its host.
</del><span class="cx">     void scheduleLoader(PassRefPtr&lt;NetworkResourceLoader&gt;);
</span><del>-
-    // Called by the WebProcess when a ResourceLoader is being cleaned up.
</del><span class="cx">     void removeLoader(NetworkResourceLoader*);
</span><span class="cx"> 
</span><del>-    // Called within the NetworkProcess on a background thread when a resource load has finished.
-    void scheduleRemoveLoader(NetworkResourceLoader*);
-
-    void receivedRedirect(NetworkResourceLoader*, const WebCore::URL&amp; redirectURL);
-    void servePendingRequests(WebCore::ResourceLoadPriority = WebCore::ResourceLoadPriorityVeryLow);
-
</del><span class="cx">     // For NetworkProcess statistics reporting.
</span><del>-    uint64_t hostsPendingCount() const;
</del><span class="cx">     uint64_t loadsPendingCount() const;
</span><del>-    uint64_t hostsActiveCount() const;
</del><span class="cx">     uint64_t loadsActiveCount() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    enum CreateHostPolicy {
-        CreateIfNotFound,
-        FindOnly
-    };
-    
-    HostRecord* hostForURL(const WebCore::URL&amp;, CreateHostPolicy = FindOnly);
-    
-    void scheduleServePendingRequests();
-    void requestTimerFired(WebCore::Timer&lt;NetworkResourceLoadScheduler&gt;*);
</del><ins>+    static void platformInitializeNetworkSettings();
</ins><span class="cx"> 
</span><del>-    void platformInitializeMaximumHTTPConnectionCountPerHost();
-
-    static void removeScheduledLoaders(void* context);
-    void removeScheduledLoaders();
-
-    typedef HashMap&lt;String, RefPtr&lt;HostRecord&gt;, StringHash&gt; HostMap;
-    HostMap m_hosts;
-
-    typedef HashSet&lt;RefPtr&lt;NetworkResourceLoader&gt;&gt; NetworkResourceLoaderSet;
-    NetworkResourceLoaderSet m_loaders;
-
-    RefPtr&lt;HostRecord&gt; m_nonHTTPProtocolHost;
-
-    bool m_isSerialLoadingEnabled;
-
-    WebCore::Timer&lt;NetworkResourceLoadScheduler&gt; m_requestTimer;
-    
-    Mutex m_loadersToRemoveMutex;
-    Vector&lt;RefPtr&lt;NetworkResourceLoader&gt;&gt; m_loadersToRemove;
-
-    unsigned m_maxRequestsInFlightPerHost;
</del><ins>+    HashSet&lt;RefPtr&lt;NetworkResourceLoader&gt;&gt; m_activeLoaders;
+    Vector&lt;RefPtr&lt;NetworkResourceLoader&gt;&gt; m_pendingSerialLoaders;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -113,7 +113,6 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx">     ASSERT(!m_handle);
</span><del>-    ASSERT(!m_hostRecord);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool NetworkResourceLoader::isSynchronous() const
</span><span class="lines">@@ -161,7 +160,7 @@
</span><span class="cx">     invalidateSandboxExtensions();
</span><span class="cx"> 
</span><span class="cx">     // Tell the scheduler about this finished loader soon so it can start more network requests.
</span><del>-    NetworkProcess::shared().networkResourceLoadScheduler().scheduleRemoveLoader(this);
</del><ins>+    NetworkProcess::shared().networkResourceLoadScheduler().removeLoader(this);
</ins><span class="cx"> 
</span><span class="cx">     if (m_handle) {
</span><span class="cx">         // Explicit deref() balanced by a ref() in NetworkResourceLoader::start()
</span><span class="lines">@@ -269,8 +268,6 @@
</span><span class="cx">     m_suggestedRequestForWillSendRequest.updateFromDelegatePreservingOldProperties(newRequest);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    RunLoop::main().dispatch(bind(&amp;NetworkResourceLoadScheduler::receivedRedirect, &amp;NetworkProcess::shared().networkResourceLoadScheduler(), this, m_suggestedRequestForWillSendRequest.url()));
-
</del><span class="cx">     m_request = m_suggestedRequestForWillSendRequest;
</span><span class="cx">     m_suggestedRequestForWillSendRequest = ResourceRequest();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -28,9 +28,9 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx"> 
</span><del>-#include &quot;HostRecord.h&quot;
</del><span class="cx"> #include &quot;MessageSender.h&quot;
</span><span class="cx"> #include &quot;NetworkConnectionToWebProcessMessages.h&quot;
</span><ins>+#include &quot;NetworkResourceLoadParameters.h&quot;
</ins><span class="cx"> #include &quot;ShareableResource.h&quot;
</span><span class="cx"> #include &lt;WebCore/ResourceHandleClient.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceLoaderOptions.h&gt;
</span><span class="lines">@@ -129,9 +129,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool isSynchronous() const;
</span><span class="cx">     bool isLoadingMainResource() const { return m_isLoadingMainResource; }
</span><del>-    
-    void setHostRecord(HostRecord* hostRecord) { ASSERT(RunLoop::isMain()); m_hostRecord = hostRecord; }
-    HostRecord* hostRecord() const { ASSERT(RunLoop::isMain()); return m_hostRecord.get(); }
</del><span class="cx"> 
</span><span class="cx">     template&lt;typename T&gt;
</span><span class="cx">     bool sendAbortingOnFailure(T&amp;&amp; message, unsigned messageSendFlags = 0)
</span><span class="lines">@@ -197,7 +194,6 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;NetworkConnectionToWebProcess&gt; m_connection;
</span><span class="cx">     
</span><del>-    RefPtr&lt;HostRecord&gt; m_hostRecord;
</del><span class="cx">     RefPtr&lt;WebCore::SharedBuffer&gt; m_bufferedData;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessmacNetworkResourceLoadSchedulerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -37,12 +37,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-void NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost()
</del><ins>+void NetworkResourceLoadScheduler::platformInitializeNetworkSettings()
</ins><span class="cx"> {
</span><span class="cx">     static const unsigned preferredConnectionCount = 6;
</span><del>-    static const unsigned unlimitedRequestCount = 10000;
</del><span class="cx"> 
</span><del>-    unsigned maximumHTTPConnectionCountPerHost = WKInitializeMaximumHTTPConnectionCountPerHost(preferredConnectionCount);
</del><ins>+    WKInitializeMaximumHTTPConnectionCountPerHost(preferredConnectionCount);
</ins><span class="cx"> 
</span><span class="cx">     Boolean keyExistsAndHasValidFormat = false;
</span><span class="cx">     Boolean prefValue = CFPreferencesGetAppBooleanValue(CFSTR(&quot;WebKitEnableHTTPPipelining&quot;), kCFPreferencesCurrentApplication, &amp;keyExistsAndHasValidFormat);
</span><span class="lines">@@ -52,10 +51,6 @@
</span><span class="cx">     if (ResourceRequest::resourcePrioritiesEnabled()) {
</span><span class="cx">         WKSetHTTPRequestMaximumPriority(toPlatformRequestPriority(ResourceLoadPriorityHighest));
</span><span class="cx">         WKSetHTTPRequestMinimumFastLanePriority(toPlatformRequestPriority(ResourceLoadPriorityMedium));
</span><del>-        m_maxRequestsInFlightPerHost = unlimitedRequestCount;
-    } else {
-        // Use WebKit scheduler when we can't use request priorities with CFNetwork.
-        m_maxRequestsInFlightPerHost = maximumHTTPConnectionCountPerHost;
</del><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesssoupNetworkResourceLoadSchedulerSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -31,17 +31,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-void NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost()
</del><ins>+void NetworkResourceLoadScheduler::platformInitializeNetworkSettings()
</ins><span class="cx"> {
</span><del>-    // Soup has its own queue control; it wants to have all requests given to
-    // it, so that it is able to look ahead, and schedule them in a good way.
-    // See the comment in ResourceRequestSoup.cpp
-    static const unsigned unlimitedConnectionCount = 10000;
-
-    // FIXME: Take advantage of Web-platform specific knowledge that can help
-    // prioritization better than libsoup alone can do.
-    // See https://bugs.webkit.org/show_bug.cgi?id=110115#c13
-    m_maxRequestsInFlightPerHost = unlimitedConnectionCount;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (172926 => 172927)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-08-25 16:25:14 UTC (rev 172926)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-08-25 18:04:39 UTC (rev 172927)
</span><span class="lines">@@ -832,8 +832,6 @@
</span><span class="cx">                 512A9761180E031D0039A149 /* DatabaseProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 512A975F180E03160039A149 /* DatabaseProcessMessages.h */; };
</span><span class="cx">                 512A9769180E09B80039A149 /* DatabaseProcessProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512A9767180E09B80039A149 /* DatabaseProcessProxyMessageReceiver.cpp */; };
</span><span class="cx">                 512A976A180E09B80039A149 /* DatabaseProcessProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 512A9768180E09B80039A149 /* DatabaseProcessProxyMessages.h */; };
</span><del>-                512C06881638F67E00ABB911 /* HostRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512C06861638F67E00ABB911 /* HostRecord.cpp */; };
-                512C06891638F67E00ABB911 /* HostRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 512C06871638F67E00ABB911 /* HostRecord.h */; };
</del><span class="cx">                 512C069016390E6900ABB911 /* NetworkResourceLoadSchedulerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 512C068F16390E6900ABB911 /* NetworkResourceLoadSchedulerMac.mm */; };
</span><span class="cx">                 512E34E4130B4D0500ABD19A /* WKApplicationCacheManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A33B3130B308C00F80CB5 /* WKApplicationCacheManager.cpp */; };
</span><span class="cx">                 512E34E5130B4D0500ABD19A /* WKApplicationCacheManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A33B4130B308C00F80CB5 /* WKApplicationCacheManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2861,8 +2859,6 @@
</span><span class="cx">                 512A9766180E05D20039A149 /* DatabaseProcessProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; name = DatabaseProcessProxy.messages.in; path = Databases/DatabaseProcessProxy.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512A9767180E09B80039A149 /* DatabaseProcessProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseProcessProxyMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512A9768180E09B80039A149 /* DatabaseProcessProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseProcessProxyMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                512C06861638F67E00ABB911 /* HostRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HostRecord.cpp; path = NetworkProcess/HostRecord.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                512C06871638F67E00ABB911 /* HostRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostRecord.h; path = NetworkProcess/HostRecord.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 512C068F16390E6900ABB911 /* NetworkResourceLoadSchedulerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkResourceLoadSchedulerMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512E3520130B550100ABD19A /* WebApplicationCacheManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebApplicationCacheManagerProxy.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512E3521130B550100ABD19A /* WebApplicationCacheManagerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebApplicationCacheManagerProxy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5182,8 +5178,6 @@
</span><span class="cx">                                 510CC7DC16138E2900D03ED3 /* mac */,
</span><span class="cx">                                 51FCB18017BBFE0300394CD8 /* AsynchronousNetworkLoaderClient.cpp */,
</span><span class="cx">                                 51FCB18117BBFE0300394CD8 /* AsynchronousNetworkLoaderClient.h */,
</span><del>-                                512C06861638F67E00ABB911 /* HostRecord.cpp */,
-                                512C06871638F67E00ABB911 /* HostRecord.h */,
</del><span class="cx">                                 513A16491630A9BF005D7D22 /* NetworkConnectionToWebProcess.cpp */,
</span><span class="cx">                                 513A164A1630A9BF005D7D22 /* NetworkConnectionToWebProcess.h */,
</span><span class="cx">                                 513A164B1630A9BF005D7D22 /* NetworkConnectionToWebProcess.messages.in */,
</span><span class="lines">@@ -7174,7 +7168,6 @@
</span><span class="cx">                                 BC06F44A12DBD1F5002D78DE /* GeolocationPermissionRequestManagerProxy.h in Headers */,
</span><span class="cx">                                 BC06F43A12DBCCFB002D78DE /* GeolocationPermissionRequestProxy.h in Headers */,
</span><span class="cx">                                 C0CE72AD1247E78D00BC0EC4 /* HandleMessage.h in Headers */,
</span><del>-                                512C06891638F67E00ABB911 /* HostRecord.h in Headers */,
</del><span class="cx">                                 37F90DE31376560E0051CF68 /* HTTPCookieAcceptPolicy.h in Headers */,
</span><span class="cx">                                 BCCF6B2512C93E7A008F9C35 /* ImageOptions.h in Headers */,
</span><span class="cx">                                 1A1E093418861D3800D2DC49 /* WebProgressTrackerClient.h in Headers */,
</span><span class="lines">@@ -8844,7 +8837,6 @@
</span><span class="cx">                                 BC06F43012DBB9B6002D78DE /* GeolocationPermissionRequestManager.cpp in Sources */,
</span><span class="cx">                                 BC06F44B12DBD1F5002D78DE /* GeolocationPermissionRequestManagerProxy.cpp in Sources */,
</span><span class="cx">                                 BC06F43B12DBCCFB002D78DE /* GeolocationPermissionRequestProxy.cpp in Sources */,
</span><del>-                                512C06881638F67E00ABB911 /* HostRecord.cpp in Sources */,
</del><span class="cx">                                 BC64696F11DBE603006455B0 /* APIArray.cpp in Sources */,
</span><span class="cx">                                 BCBCB0CD1215E33A00DE59CA /* ImmutableDictionary.cpp in Sources */,
</span><span class="cx">                                 BC204EE211C83E98008F3375 /* InjectedBundle.cpp in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>