Remove WebCookieManager and messaging from WebContent process.
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Mar 2018 20:43:34 +0000 (20:43 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Mar 2018 20:43:34 +0000 (20:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183382
<rdar://problem/38191450>

Reviewed by Alex Christensen.

Networking access was fully removed from the WebContent process in Bug 183192 (and related bugs). The
UIProcess no longer needs to ask the WebContent process about networking-related things, and shouldn't
waste everyone's time doing so.

This bug removes some left-over WebCookieManager API stuff, and is a first step in purging the
WebContent Process from accessing cookie data.

* NetworkProcess/Cookies: Copied from WebProcess/Cookies.
* NetworkProcess/Cookies/WebCookieManager.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Cookies: Removed.
* WebProcess/Cookies/WebCookieManager.cpp: Removed.
* WebProcess/Cookies/WebCookieManager.h: Removed.
* WebProcess/Cookies/WebCookieManager.messages.in: Removed.
* WebProcess/Cookies/curl: Removed.
* WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Removed.
* WebProcess/Cookies/mac: Removed.
* WebProcess/Cookies/mac/WebCookieManagerMac.mm: Removed.
* WebProcess/Cookies/soup: Removed.
* WebProcess/Cookies/soup/WebCookieManagerSoup.cpp: Removed.
* WebProcess/InjectedBundle/InjectedBundle.cpp: Remove 'WebCookieManager.h" header.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Ditto.
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Ditto.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Remove call to add WebCookieManager as a
WebProcessSupplement.
* CMakeLists.txt: Revised paths.
* DerivedSources.make: Ditto.
* PlatformMac.cmake: Ditto.
* PlatformWin.cmake: Ditto.
* SourcesGTK.txt: Ditto.
* SourcesWPE.txt: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229426 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/DerivedSources.make
Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp [moved from Source/WebKit/WebProcess/Cookies/WebCookieManager.cpp with 99% similarity]
Source/WebKit/NetworkProcess/Cookies/WebCookieManager.h [moved from Source/WebKit/WebProcess/Cookies/WebCookieManager.h with 93% similarity]
Source/WebKit/NetworkProcess/Cookies/WebCookieManager.messages.in [moved from Source/WebKit/WebProcess/Cookies/WebCookieManager.messages.in with 100% similarity]
Source/WebKit/NetworkProcess/Cookies/curl/WebCookieManagerCurl.cpp [moved from Source/WebKit/WebProcess/Cookies/curl/WebCookieManagerCurl.cpp with 100% similarity]
Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm [moved from Source/WebKit/WebProcess/Cookies/mac/WebCookieManagerMac.mm with 100% similarity]
Source/WebKit/NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp [moved from Source/WebKit/WebProcess/Cookies/soup/WebCookieManagerSoup.cpp with 100% similarity]
Source/WebKit/PlatformMac.cmake
Source/WebKit/PlatformWin.cmake
Source/WebKit/SourcesGTK.txt
Source/WebKit/SourcesWPE.txt
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
Source/WebKit/WebProcess/WebProcess.cpp

index fb836af..4f33bcc 100644 (file)
@@ -5,6 +5,7 @@ set_property(DIRECTORY . PROPERTY FOLDER "WebKit")
 set(WebKit_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}"
     "${WEBKIT_DIR}/NetworkProcess"
+    "${WEBKIT_DIR}/NetworkProcess/Cookies"
     "${WEBKIT_DIR}/NetworkProcess/CustomProtocols"
     "${WEBKIT_DIR}/NetworkProcess/Downloads"
     "${WEBKIT_DIR}/NetworkProcess/FileAPI"
@@ -56,7 +57,6 @@ set(WebKit_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/WebProcess/ApplicationCache"
     "${WEBKIT_DIR}/WebProcess/Automation"
     "${WEBKIT_DIR}/WebProcess/Cache"
-    "${WEBKIT_DIR}/WebProcess/Cookies"
     "${WEBKIT_DIR}/WebProcess/Databases"
     "${WEBKIT_DIR}/WebProcess/Databases/IndexedDB"
     "${WEBKIT_DIR}/WebProcess/FileAPI"
@@ -97,6 +97,9 @@ set(WebKit_SYSTEM_INCLUDE_DIRECTORIES
 )
 
 set(WebKit_SOURCES
+    NetworkProcess/Cookies/WebCookieManager.cpp
+    NetworkProcess/Cookies/WebCookieManager.messages.in
+
     NetworkProcess/Downloads/Download.cpp
     NetworkProcess/Downloads/DownloadManager.cpp
     NetworkProcess/Downloads/PendingDownload.cpp
@@ -463,8 +466,6 @@ set(WebKit_SOURCES
     WebProcess/Cache/WebCacheStorageConnection.cpp
     WebProcess/Cache/WebCacheStorageProvider.cpp
 
-    WebProcess/Cookies/WebCookieManager.cpp
-
     WebProcess/Databases/WebDatabaseProvider.cpp
 
     WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
@@ -668,8 +669,6 @@ set(WebKit_MESSAGES_IN_FILES
 
     WebProcess/Cache/WebCacheStorageConnection.messages.in
 
-    WebProcess/Cookies/WebCookieManager.messages.in
-
     WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in
 
     WebProcess/FullScreen/WebFullScreenManager.messages.in
index 3f35528..cacabbd 100644 (file)
@@ -1,3 +1,44 @@
+2018-03-08  Brent Fulgham  <bfulgham@apple.com>
+
+        Remove WebCookieManager and messaging from WebContent process.
+        https://bugs.webkit.org/show_bug.cgi?id=183382
+        <rdar://problem/38191450>
+
+        Reviewed by Alex Christensen.
+
+        Networking access was fully removed from the WebContent process in Bug 183192 (and related bugs). The
+        UIProcess no longer needs to ask the WebContent process about networking-related things, and shouldn't
+        waste everyone's time doing so.
+
+        This bug removes some left-over WebCookieManager API stuff, and is a first step in purging the
+        WebContent Process from accessing cookie data.
+
+        * NetworkProcess/Cookies: Copied from WebProcess/Cookies.
+        * NetworkProcess/Cookies/WebCookieManager.h:
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebProcess/Cookies: Removed.
+        * WebProcess/Cookies/WebCookieManager.cpp: Removed.
+        * WebProcess/Cookies/WebCookieManager.h: Removed.
+        * WebProcess/Cookies/WebCookieManager.messages.in: Removed.
+        * WebProcess/Cookies/curl: Removed.
+        * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Removed.
+        * WebProcess/Cookies/mac: Removed.
+        * WebProcess/Cookies/mac/WebCookieManagerMac.mm: Removed.
+        * WebProcess/Cookies/soup: Removed.
+        * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp: Removed.
+        * WebProcess/InjectedBundle/InjectedBundle.cpp: Remove 'WebCookieManager.h" header.
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Ditto.
+        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Ditto.
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::WebProcess): Remove call to add WebCookieManager as a
+        WebProcessSupplement.
+        * CMakeLists.txt: Revised paths.
+        * DerivedSources.make: Ditto.
+        * PlatformMac.cmake: Ditto.
+        * PlatformWin.cmake: Ditto.
+        * SourcesGTK.txt: Ditto.
+        * SourcesWPE.txt: Ditto.
+
 2018-03-08  Youenn Fablet  <youenn@apple.com>
 
         libwebrtc update broke internal builds
index 71a804b..9d66c0d 100644 (file)
@@ -23,6 +23,7 @@
 VPATH = \
     $(WebKit2) \
     $(WebKit2)/NetworkProcess \
+    $(WebKit2)/NetworkProcess/Cookies \
     $(WebKit2)/NetworkProcess/cache \
     $(WebKit2)/NetworkProcess/CustomProtocols \
     $(WebKit2)/NetworkProcess/mac \
@@ -42,7 +43,6 @@ VPATH = \
     $(WebKit2)/WebProcess/ApplicationCache \
     $(WebKit2)/WebProcess/Automation \
     $(WebKit2)/WebProcess/Cache \
-    $(WebKit2)/WebProcess/Cookies \
     $(WebKit2)/WebProcess/CredentialManagement \
     $(WebKit2)/WebProcess/Databases/IndexedDB \
     $(WebKit2)/WebProcess/FullScreen \
@@ -54,6 +54,8 @@ WebCookieManager::WebCookieManager(ChildProcess& process)
     m_process.addMessageReceiver(Messages::WebCookieManager::messageReceiverName(), *this);
 }
 
+WebCookieManager::~WebCookieManager() = default;
+
 void WebCookieManager::getHostnamesWithCookies(PAL::SessionID sessionID, CallbackID callbackID)
 {
     HashSet<String> hostnames;
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,7 +30,6 @@
 #include "MessageReceiver.h"
 #include "NetworkProcessSupplement.h"
 #include "OptionalCallbackID.h"
-#include "WebProcessSupplement.h"
 #include <pal/SessionID.h>
 #include <stdint.h>
 #include <wtf/Forward.h>
@@ -49,10 +48,11 @@ namespace WebKit {
 
 class ChildProcess;
 
-class WebCookieManager : public WebProcessSupplement, public NetworkProcessSupplement, public IPC::MessageReceiver {
+class WebCookieManager : public NetworkProcessSupplement, public IPC::MessageReceiver {
     WTF_MAKE_NONCOPYABLE(WebCookieManager);
 public:
     WebCookieManager(ChildProcess&);
+    ~WebCookieManager();
 
     static const char* supplementName();
 
index e74955e..2fa81a9 100644 (file)
@@ -19,6 +19,8 @@ if (NOT AVFAUDIO_LIBRARY-NOTFOUND)
 endif ()
 
 list(APPEND WebKit_SOURCES
+    NetworkProcess/Cookies/mac/WebCookieManagerMac.mm
+
     NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp
 
     NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm
@@ -319,8 +321,6 @@ list(APPEND WebKit_SOURCES
     UIProcess/mac/WebProcessProxyMac.mm
     UIProcess/mac/WindowServerConnection.mm
 
-    WebProcess/Cookies/mac/WebCookieManagerMac.mm
-
     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm
     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm
     WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm
index dff01bd..56e150e 100644 (file)
@@ -107,6 +107,8 @@ if (${WTF_PLATFORM_WIN_CAIRO})
     add_definitions(-DUSE_CAIRO=1 -DUSE_CURL=1)
 
     list(APPEND WebKit_SOURCES
+        NetworkProcess/Cookies/curl/WebCookieManagerCurl.cpp
+
         NetworkProcess/cache/NetworkCacheCodersCurl.cpp
         NetworkProcess/cache/NetworkCacheDataCurl.cpp
         NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp
@@ -118,8 +120,6 @@ if (${WTF_PLATFORM_WIN_CAIRO})
 
         Shared/curl/WebCoreArgumentCodersCurl.cpp
 
-        WebProcess/Cookies/curl/WebCookieManagerCurl.cpp
-
         WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp
     )
 
index 679783d..28e6cd7 100644 (file)
@@ -25,6 +25,8 @@
 // linking PluginProcessGTK2. I don't know why this is necessary. These
 // annotations should be revisited after removing PluginProcessGTK2.
 
+NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp
+
 NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp
 
 NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp
@@ -237,8 +239,6 @@ UIProcess/gtk/WebProcessPoolGtk.cpp @no-unify
 UIProcess/soup/WebCookieManagerProxySoup.cpp
 UIProcess/soup/WebProcessPoolSoup.cpp
 
-WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
-
 WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp
 
 WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
index 417eec6..70dbfdf 100644 (file)
@@ -21,6 +21,8 @@
 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 // THE POSSIBILITY OF SUCH DAMAGE.
 
+NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp
+
 NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp
 
 NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp
@@ -194,8 +196,6 @@ UIProcess/wpe/WebPasteboardProxyWPE.cpp
 UIProcess/wpe/WebPreferencesWPE.cpp
 UIProcess/wpe/WebProcessPoolWPE.cpp
 
-WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
-
 WebProcess/InjectedBundle/API/glib/WebKitConsoleMessage.cpp @no-unify
 WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp @no-unify
 WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp @no-unify
index 9ab257c..7587029 100644 (file)
                                3309344E1315B94D0097A7BC /* WebCookieManager.messages.in */,
                        );
                        name = Cookies;
+                       path = NetworkProcess;
                        sourceTree = "<group>";
                };
                33D3A3BD1339609800709BE4 /* MediaCache */ = {
                                E489D2821A0A2BE80078C06A /* cache */,
                                539BD5B21DADB0BA00F2E4E1 /* capture */,
                                7EC4F0F818E4A922008056AF /* cocoa */,
+                               3309344B1315B93A0097A7BC /* Cookies */,
                                5C1426F21C23F82D00D41183 /* CustomProtocols */,
                                5C1426F11C23F81700D41183 /* Downloads */,
                                BC82837C16B45DA500A278FE /* EntryPoint */,
                                1C0A19431C8FF1A800FE0EBB /* Automation */,
                                41D129D81F3D101400D15E47 /* Cache */,
                                7C6E70F818B2D47E00F24E2E /* cocoa */,
-                               3309344B1315B93A0097A7BC /* Cookies */,
                                5760828A202984C900116678 /* CredentialManagement */,
                                512A9754180DF9270039A149 /* Databases */,
                                BCACC43B16B24C5D00B6E092 /* EntryPoint */,
index aa2308a..7317c3c 100644 (file)
@@ -34,7 +34,6 @@
 #include "SessionTracker.h"
 #include "UserData.h"
 #include "WebConnectionToUIProcess.h"
-#include "WebCookieManager.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebFrame.h"
 #include "WebFrameNetworkingContext.h"
index 571a72e..e81e49a 100644 (file)
@@ -35,7 +35,6 @@
 #include "NetworkResourceLoadParameters.h"
 #include "PluginInfoStore.h"
 #include "SessionTracker.h"
-#include "WebCookieManager.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebErrors.h"
 #include "WebFrame.h"
index 4734db4..63fd97f 100644 (file)
@@ -29,7 +29,6 @@
 #include "CookieStorageUtilsCF.h"
 #include "NetworkSession.h"
 #include "SessionTracker.h"
-#include "WebCookieManager.h"
 #include "WebPage.h"
 #include "WebProcess.h"
 #include "WebsiteDataStoreParameters.h"
index b02e178..1716365 100644 (file)
@@ -48,7 +48,6 @@
 #include "WebAutomationSessionProxy.h"
 #include "WebCacheStorageProvider.h"
 #include "WebConnectionToUIProcess.h"
-#include "WebCookieManager.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebFrame.h"
 #include "WebFrameNetworkingContext.h"
@@ -187,7 +186,6 @@ WebProcess::WebProcess()
     // so that ports have a chance to customize, and ifdefs in this file are
     // limited.
     addSupplement<WebGeolocationManager>();
-    addSupplement<WebCookieManager>();
 
 #if ENABLE(NOTIFICATIONS)
     addSupplement<WebNotificationManager>();