From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- .../NetworkProcess/soup/RemoteNetworkingContextSoup.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp') diff --git a/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp b/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp index d7cf86efb..2dba10521 100644 --- a/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp +++ b/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp @@ -26,9 +26,10 @@ */ #include "config.h" -#if ENABLE(NETWORK_PROCESS) #include "RemoteNetworkingContext.h" +#include "NetworkSession.h" +#include "SessionTracker.h" #include #include #include @@ -46,16 +47,22 @@ bool RemoteNetworkingContext::isValid() const return true; } -void RemoteNetworkingContext::ensurePrivateBrowsingSession(uint64_t sessionID) +void RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID sessionID) { - notImplemented(); + 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(); } } - -#endif // ENABLE(NETWORK_PROCESS) -- cgit v1.2.1