Create a NetworkSession for each SessionID
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2015 00:50:27 +0000 (00:50 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2015 00:50:27 +0000 (00:50 +0000)
commitf80293fd144a9ef267bb80de5c93bfc0edb1f7a5
treec1431a205b4b2637484df09059d6cb1290d7e7e5
parent2a566dacfbd5ff87197bd6bb789751706565511a
Create a NetworkSession for each SessionID
https://bugs.webkit.org/show_bug.cgi?id=150857

Reviewed by Anders Carlsson.

This patch renames SessionTracker::session to storageSession and makes a parallel
structure for NetworkSessions.  NetworkSession and NetworkStorageSession should eventually
become the same class in WebCore.  Because not everybody uses NetworkSessions yet,
we keep them separate but created, destroyed, and managed together.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::abort):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
(WebKit::NetworkDataTask::client):
(WebKit::NetworkDataTask::clearClient):
(WebKit::NetworkingDataTask::client): Deleted.
(WebKit::NetworkingDataTask::clearClient): Deleted.
(WebKit::NetworkSession::~NetworkSession): Deleted.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::configurationForType):
(WebKit::defaultNetworkSession):
(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkDataTask::NetworkDataTask):
(WebKit::NetworkDataTask::~NetworkDataTask):
(WebKit::NetworkDataTask::cancel):
(WebKit::NetworkDataTask::resume):
(WebKit::NetworkDataTask::taskIdentifier):
(WebKit::NetworkSession::create): Deleted.
(WebKit::NetworkSession::singleton): Deleted.
(WebKit::NetworkingDataTask::NetworkingDataTask): Deleted.
(WebKit::NetworkingDataTask::~NetworkingDataTask): Deleted.
(WebKit::NetworkingDataTask::suspend): Deleted.
(WebKit::NetworkingDataTask::resume): Deleted.
(WebKit::NetworkingDataTask::taskIdentifier): Deleted.
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::storageSession):
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::staticStorageSessionMap):
(WebKit::identifierBase):
(WebKit::SessionTracker::storageSessionMap):
(WebKit::SessionTracker::getIdentifierBase):
(WebKit::SessionTracker::storageSession):
(WebKit::staticSessionMap):
(WebKit::SessionTracker::networkSession):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
(WebKit::SessionTracker::sessionMap): Deleted.
(WebKit::SessionTracker::session): Deleted.
* Shared/SessionTracker.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebKit::WebFrameNetworkingContext::storageSession):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.h
Source/WebKit2/NetworkProcess/NetworkSession.h
Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm
Source/WebKit2/Shared/SessionTracker.cpp
Source/WebKit2/Shared/SessionTracker.h
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp