<!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>[213746] 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/213746">213746</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2017-03-10 18:12:54 -0800 (Fri, 10 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Don't compile RemoteNetworkingContext when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=169497

Reviewed by Andy Estes.

RemoteNetworkingContext is only really used because PingHandle requires a NetworkingContext.
When using NetworkSession, we use PingLoad instead of PingHandle, so there's no reason to 
ensure there's a RemoteNetworkingContext corresponding to new private sessions when they're never used.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Removed.
* PlatformGTK.cmake:
GTK only uses NetworkSession, so RemoteNetworkingContextSoup is no longer necessary.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessRemoteNetworkingContexth">trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessmacRemoteNetworkingContextmm">trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2NetworkProcesssoupRemoteNetworkingContextSoupcpp">trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (213745 => 213746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-11 02:04:37 UTC (rev 213745)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-11 02:12:54 UTC (rev 213746)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2017-03-10  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Don't compile RemoteNetworkingContext when using NetworkSession
+        https://bugs.webkit.org/show_bug.cgi?id=169497
+
+        Reviewed by Andy Estes.
+
+        RemoteNetworkingContext is only really used because PingHandle requires a NetworkingContext.
+        When using NetworkSession, we use PingLoad instead of PingHandle, so there's no reason to 
+        ensure there's a RemoteNetworkingContext corresponding to new private sessions when they're never used.
+
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::initializeNetworkProcess):
+        (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
+        * NetworkProcess/RemoteNetworkingContext.h:
+        * NetworkProcess/mac/RemoteNetworkingContext.mm:
+        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
+        * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Removed.
+        * PlatformGTK.cmake:
+        GTK only uses NetworkSession, so RemoteNetworkingContextSoup is no longer necessary.
+
</ins><span class="cx"> 2017-03-10  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebRTC][WK2][iOS] Support com.apple.coremedia.compressionsession for more WebRTC Cases
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (213745 => 213746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2017-03-11 02:04:37 UTC (rev 213745)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2017-03-11 02:12:54 UTC (rev 213746)
</span><span class="lines">@@ -232,9 +232,11 @@
</span><span class="cx"> 
</span><span class="cx">     setCanHandleHTTPSServerTrustEvaluation(parameters.canHandleHTTPSServerTrustEvaluation);
</span><span class="cx"> 
</span><ins>+#if !USE(NETWORK_SESSION)
</ins><span class="cx">     // FIXME: instead of handling this here, a message should be sent later (scales to multiple sessions)
</span><span class="cx">     if (parameters.privateBrowsingEnabled)
</span><span class="cx">         RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID::legacyPrivateSessionID());
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     if (parameters.shouldUseTestingNetworkSession)
</span><span class="cx">         NetworkStorageSession::switchToNewTestingSession();
</span><span class="lines">@@ -287,7 +289,9 @@
</span><span class="cx"> 
</span><span class="cx"> void NetworkProcess::ensurePrivateBrowsingSession(SessionID sessionID)
</span><span class="cx"> {
</span><ins>+#if !USE(NETWORK_SESSION)
</ins><span class="cx">     RemoteNetworkingContext::ensurePrivateBrowsingSession(sessionID);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkProcess::destroyPrivateBrowsingSession(SessionID sessionID)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessRemoteNetworkingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h (213745 => 213746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h        2017-03-11 02:04:37 UTC (rev 213745)
+++ trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h        2017-03-11 02:12:54 UTC (rev 213746)
</span><span class="lines">@@ -24,12 +24,13 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef RemoteNetworkingContext_h
-#define RemoteNetworkingContext_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/NetworkingContext.h&gt;
</span><span class="cx"> #include &lt;WebCore/SessionID.h&gt;
</span><span class="cx"> 
</span><ins>+#if !USE(NETWORK_SESSION)
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> class RemoteNetworkingContext final : public WebCore::NetworkingContext {
</span><span class="lines">@@ -73,4 +74,4 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#endif // RemoteNetworkingContext_h
</del><ins>+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessmacRemoteNetworkingContextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm (213745 => 213746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm        2017-03-11 02:04:37 UTC (rev 213745)
+++ trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm        2017-03-11 02:12:54 UTC (rev 213746)
</span><span class="lines">@@ -36,11 +36,12 @@
</span><span class="cx"> #import &lt;WebKitSystemInterface.h&gt;
</span><span class="cx"> #import &lt;wtf/MainThread.h&gt;
</span><span class="cx"> 
</span><ins>+#if !USE(NETWORK_SESSION)
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> RemoteNetworkingContext::~RemoteNetworkingContext()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -93,11 +94,8 @@
</span><span class="cx">         base = SessionTracker::getIdentifierBase();
</span><span class="cx"> 
</span><span class="cx">     NetworkStorageSession::ensurePrivateBrowsingSession(sessionID, base + '.' + String::number(sessionID.sessionID()));
</span><ins>+}
</ins><span class="cx"> 
</span><del>-#if USE(NETWORK_SESSION)
-    auto networkSession = NetworkSession::create(sessionID, NetworkProcess::singleton().supplement&lt;LegacyCustomProtocolManager&gt;());
-    SessionTracker::setSession(sessionID, WTFMove(networkSession));
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-}
</del><ins>+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcesssoupRemoteNetworkingContextSoupcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp (213745 => 213746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp        2017-03-11 02:04:37 UTC (rev 213745)
+++ trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp        2017-03-11 02:12:54 UTC (rev 213746)
</span><span class="lines">@@ -1,68 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- * Copyright (C) 2013 University of Szeged. All rights reserved.
- * Copyright (C) 2013 Company 100 Inc.
- *
- * 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;RemoteNetworkingContext.h&quot;
-
-#include &quot;NetworkSession.h&quot;
-#include &quot;SessionTracker.h&quot;
-#include &lt;WebCore/NetworkStorageSession.h&gt;
-#include &lt;WebCore/NotImplemented.h&gt;
-#include &lt;WebCore/ResourceHandle.h&gt;
-
-using namespace WebCore;
-
-namespace WebKit {
-
-RemoteNetworkingContext::~RemoteNetworkingContext()
-{
-}
-
-bool RemoteNetworkingContext::isValid() const
-{
-    return true;
-}
-
-void RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID sessionID)
-{
-    ASSERT(sessionID.isEphemeral());
-
-    if (NetworkStorageSession::storageSession(sessionID))
-        return;
-
-    NetworkStorageSession::ensurePrivateBrowsingSession(sessionID, String::number(sessionID.sessionID()));
-    SessionTracker::setSession(sessionID, NetworkSession::create(sessionID));
-}
-
-NetworkStorageSession&amp; RemoteNetworkingContext::storageSession() const
-{
-    if (auto session = NetworkStorageSession::storageSession(m_sessionID))
-        return *session;
-    return NetworkStorageSession::defaultStorageSession();
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (213745 => 213746)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2017-03-11 02:04:37 UTC (rev 213745)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2017-03-11 02:12:54 UTC (rev 213746)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx">     NetworkProcess/soup/NetworkProcessMainSoup.cpp
</span><span class="cx">     NetworkProcess/soup/NetworkProcessSoup.cpp
</span><span class="cx">     NetworkProcess/soup/NetworkSessionSoup.cpp
</span><del>-    NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
</del><span class="cx"> 
</span><span class="cx">     Platform/IPC/glib/GSocketMonitor.cpp
</span><span class="cx">     Platform/IPC/unix/AttachmentUnix.cpp
</span></span></pre>
</div>
</div>

</body>
</html>