diff options
Diffstat (limited to 'Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp')
-rw-r--r-- | Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
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 <WebCore/NetworkStorageSession.h> #include <WebCore/NotImplemented.h> #include <WebCore/ResourceHandle.h> @@ -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) |