Stop using NetworkStorageSession::storageSession in WebCore
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 19:10:53 +0000 (19:10 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 19:10:53 +0000 (19:10 +0000)
commitcf54a8d89b4f723f39277429f9930acd2ec05f0f
tree16d7282b84ff810eb6b1e7427fd787da16d3ce0a
parent31c626be8ccf5b410f74dc5acf4a5dbd596bf42b
Stop using NetworkStorageSession::storageSession in WebCore
https://bugs.webkit.org/show_bug.cgi?id=193529

Reviewed by Tim Horton.

Source/WebCore:

Ownership of the map that NetworkStorageSession::storageSession searches needs to move to the WebKit/WebKitLegacy layer,
so when WebCore used to look in this map it needs to call a client function to ask the layer above it for the storage object.
I've called this client StorageSessionProvider::storageSession.  Right now it just looks in NetworkStorageSession::storageSession,
but this added abstraction makes it possible to move the currently process-global map to be a member of the NetworkProcess object.

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
* WebCore.xcodeproj/project.pbxproj:
* loader/CookieJar.cpp:
(WebCore::CookieJar::create):
(WebCore::CookieJar::CookieJar):
(WebCore::CookieJar::cookies const):
(WebCore::CookieJar::setCookies):
(WebCore::CookieJar::cookiesEnabled const):
(WebCore::CookieJar::cookieRequestHeaderFieldValue const):
(WebCore::CookieJar::getRawCookies const):
(WebCore::CookieJar::deleteCookie):
* loader/CookieJar.h:
* loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
* page/Page.h:
* page/SocketProvider.cpp:
(WebCore::SocketProvider::createSocketStreamHandle):
* page/SocketProvider.h:
* platform/network/NetworkingContext.h:
* platform/network/SocketStreamHandleImpl.cpp:
(WebCore::cookieDataForHandshake):
(WebCore::SocketStreamHandleImpl::platformSendHandshake):
* platform/network/StorageSessionProvider.h: Added.
(WebCore::StorageSessionProvider::~StorageSessionProvider):
* platform/network/cf/SocketStreamHandleImpl.h:
(WebCore::SocketStreamHandleImpl::create):
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
(WebCore::SocketStreamHandleImpl::getStoredCONNECTProxyCredentials):
* platform/network/curl/SocketStreamHandleImpl.h:
(WebCore::SocketStreamHandleImpl::create):
* platform/network/soup/SocketStreamHandleImpl.h:
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::create):

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::createSocketStream):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkSocketStream.cpp:
(WebKit::NetworkSocketStream::create):
(WebKit::NetworkSocketStream::NetworkSocketStream):
* NetworkProcess/NetworkSocketStream.h:
* NetworkProcess/NetworkStorageSessionProvider.h: Added.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Network/WebSocketProvider.cpp:
(WebKit::WebSocketProvider::createSocketStreamHandle):
* WebProcess/Network/WebSocketProvider.h:
* WebProcess/WebPage/WebCookieJar.cpp:
(WebKit::WebCookieJar::WebCookieJar):
* WebProcess/WebPage/WebCookieJar.h:

Source/WebKitLegacy:

* WebCoreSupport/PageStorageSessionProvider.h: Added.
* WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

* Misc/WebCache.mm:
(+[WebCache addImageToCache:forURL:forFrame:]):
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:

* WebView.cpp:
(WebView::initWithFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/loader/CookieJar.cpp
Source/WebCore/loader/CookieJar.h
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/page/Page.h
Source/WebCore/page/SocketProvider.cpp
Source/WebCore/page/SocketProvider.h
Source/WebCore/platform/network/NetworkingContext.h
Source/WebCore/platform/network/SocketStreamHandleImpl.cpp
Source/WebCore/platform/network/StorageSessionProvider.h [new file with mode: 0644]
Source/WebCore/platform/network/cf/SocketStreamHandleImpl.h
Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp
Source/WebCore/platform/network/curl/SocketStreamHandleImpl.h
Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp
Source/WebCore/platform/network/soup/SocketStreamHandleImpl.h
Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
Source/WebKit/NetworkProcess/NetworkSocketStream.h
Source/WebKit/NetworkProcess/NetworkStorageSessionProvider.h [new file with mode: 0644]
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/WebProcess/Network/WebSocketProvider.cpp
Source/WebKit/WebProcess/Network/WebSocketProvider.h
Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp
Source/WebKit/WebProcess/WebPage/WebCookieJar.h
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebCoreSupport/PageStorageSessionProvider.h [new file with mode: 0644]
Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Misc/WebCache.mm
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebView.cpp