Title: [213746] trunk/Source/WebKit2
Revision
213746
Author
achristen...@apple.com
Date
2017-03-10 18:12:54 -0800 (Fri, 10 Mar 2017)

Log Message

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.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (213745 => 213746)


--- 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)
@@ -1,3 +1,24 @@
+2017-03-10  Alex Christensen  <achristen...@webkit.org>
+
+        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.
+
 2017-03-10  Brent Fulgham  <bfulg...@apple.com>
 
         [WebRTC][WK2][iOS] Support com.apple.coremedia.compressionsession for more WebRTC Cases

Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (213745 => 213746)


--- 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)
@@ -232,9 +232,11 @@
 
     setCanHandleHTTPSServerTrustEvaluation(parameters.canHandleHTTPSServerTrustEvaluation);
 
+#if !USE(NETWORK_SESSION)
     // FIXME: instead of handling this here, a message should be sent later (scales to multiple sessions)
     if (parameters.privateBrowsingEnabled)
         RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID::legacyPrivateSessionID());
+#endif
 
     if (parameters.shouldUseTestingNetworkSession)
         NetworkStorageSession::switchToNewTestingSession();
@@ -287,7 +289,9 @@
 
 void NetworkProcess::ensurePrivateBrowsingSession(SessionID sessionID)
 {
+#if !USE(NETWORK_SESSION)
     RemoteNetworkingContext::ensurePrivateBrowsingSession(sessionID);
+#endif
 }
 
 void NetworkProcess::destroyPrivateBrowsingSession(SessionID sessionID)

Modified: trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h (213745 => 213746)


--- 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)
@@ -24,12 +24,13 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RemoteNetworkingContext_h
-#define RemoteNetworkingContext_h
+#pragma once
 
 #include <WebCore/NetworkingContext.h>
 #include <WebCore/SessionID.h>
 
+#if !USE(NETWORK_SESSION)
+
 namespace WebKit {
 
 class RemoteNetworkingContext final : public WebCore::NetworkingContext {
@@ -73,4 +74,4 @@
 
 }
 
-#endif // RemoteNetworkingContext_h
+#endif

Modified: trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm (213745 => 213746)


--- 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)
@@ -36,11 +36,12 @@
 #import <WebKitSystemInterface.h>
 #import <wtf/MainThread.h>
 
+#if !USE(NETWORK_SESSION)
+
 using namespace WebCore;
 
 namespace WebKit {
 
-
 RemoteNetworkingContext::~RemoteNetworkingContext()
 {
 }
@@ -93,11 +94,8 @@
         base = SessionTracker::getIdentifierBase();
 
     NetworkStorageSession::ensurePrivateBrowsingSession(sessionID, base + '.' + String::number(sessionID.sessionID()));
+}
 
-#if USE(NETWORK_SESSION)
-    auto networkSession = NetworkSession::create(sessionID, NetworkProcess::singleton().supplement<LegacyCustomProtocolManager>());
-    SessionTracker::setSession(sessionID, WTFMove(networkSession));
-#endif
 }
 
-}
+#endif

Deleted: trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp (213745 => 213746)


--- 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)
@@ -1,68 +0,0 @@
-/*
- * 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 "config.h"
-#include "RemoteNetworkingContext.h"
-
-#include "NetworkSession.h"
-#include "SessionTracker.h"
-#include <WebCore/NetworkStorageSession.h>
-#include <WebCore/NotImplemented.h>
-#include <WebCore/ResourceHandle.h>
-
-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& RemoteNetworkingContext::storageSession() const
-{
-    if (auto session = NetworkStorageSession::storageSession(m_sessionID))
-        return *session;
-    return NetworkStorageSession::defaultStorageSession();
-}
-
-}

Modified: trunk/Source/WebKit2/PlatformGTK.cmake (213745 => 213746)


--- 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)
@@ -40,7 +40,6 @@
     NetworkProcess/soup/NetworkProcessMainSoup.cpp
     NetworkProcess/soup/NetworkProcessSoup.cpp
     NetworkProcess/soup/NetworkSessionSoup.cpp
-    NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
 
     Platform/IPC/glib/GSocketMonitor.cpp
     Platform/IPC/unix/AttachmentUnix.cpp
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to