Changeset 162245 in webkit
- Timestamp:
- Jan 17, 2014 10:27:51 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 deleted
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/CMakeLists.txt
r162237 r162245 205 205 Shared/SecurityOriginData.cpp 206 206 Shared/SessionState.cpp 207 Shared/SessionTracker.cpp208 207 Shared/ShareableBitmap.cpp 209 208 Shared/ShareableResource.cpp … … 295 294 296 295 UIProcess/APINavigationData.cpp 297 UIProcess/APISession.cpp298 296 UIProcess/BackingStore.cpp 299 297 UIProcess/DrawingAreaProxy.cpp -
trunk/Source/WebKit2/ChangeLog
r162241 r162245 1 2014-01-17 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r162237 and r162241. 4 http://trac.webkit.org/changeset/162237 5 http://trac.webkit.org/changeset/162241 6 https://bugs.webkit.org/show_bug.cgi?id=127216 7 8 Broke lots of API tests (Requested by ap on #webkit). 9 10 * CMakeLists.txt: 11 * GNUmakefile.list.am: 12 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 13 (WebKit::storageSession): 14 (WebKit::NetworkConnectionToWebProcess::startDownload): 15 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): 16 (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): 17 (WebKit::NetworkConnectionToWebProcess::cookiesEnabled): 18 (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue): 19 (WebKit::NetworkConnectionToWebProcess::getRawCookies): 20 (WebKit::NetworkConnectionToWebProcess::deleteCookie): 21 * NetworkProcess/NetworkConnectionToWebProcess.h: 22 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 23 * NetworkProcess/NetworkProcess.cpp: 24 (WebKit::NetworkProcess::initializeNetworkProcess): 25 (WebKit::NetworkProcess::ensurePrivateBrowsingSession): 26 (WebKit::NetworkProcess::destroyPrivateBrowsingSession): 27 * NetworkProcess/NetworkProcess.h: 28 * NetworkProcess/NetworkProcess.messages.in: 29 * NetworkProcess/RemoteNetworkingContext.h: 30 * NetworkProcess/mac/RemoteNetworkingContext.mm: 31 (WebKit::privateBrowsingStorageSession): 32 (WebKit::RemoteNetworkingContext::storageSession): 33 (WebKit::RemoteNetworkingContext::privateBrowsingSession): 34 (WebKit::privateBrowsingStorageSessionIdentifierBase): 35 (WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase): 36 (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): 37 (WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession): 38 * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: 39 (WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase): 40 (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): 41 (WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession): 42 (WebKit::RemoteNetworkingContext::privateBrowsingSession): 43 * Shared/SessionTracker.cpp: Removed. 44 * Shared/SessionTracker.h: Removed. 45 * UIProcess/APISession.cpp: 46 (API::Session::Session): 47 (API::Session::create): 48 (API::Session::isEphemeral): 49 * UIProcess/APISession.h: 50 * UIProcess/WebContext.cpp: 51 (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled): 52 (WebKit::WebContext::createNewWebProcess): 53 (WebKit::WebContext::createWebPage): 54 * UIProcess/WebContext.h: 55 * UIProcess/WebPageProxy.cpp: 56 (WebKit::WebPageProxy::create): 57 (WebKit::WebPageProxy::WebPageProxy): 58 * UIProcess/WebPageProxy.h: 59 * UIProcess/WebProcessProxy.cpp: 60 (WebKit::WebProcessProxy::createWebPage): 61 * UIProcess/WebProcessProxy.h: 62 * WebKit2.xcodeproj/project.pbxproj: 63 * WebProcess/InjectedBundle/InjectedBundle.cpp: 64 (WebKit::InjectedBundle::setPrivateBrowsingEnabled): 65 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 66 (WebKit::WebPlatformStrategies::cookiesForDOM): 67 (WebKit::WebPlatformStrategies::setCookiesFromDOM): 68 (WebKit::WebPlatformStrategies::cookiesEnabled): 69 (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): 70 (WebKit::WebPlatformStrategies::getRawCookies): 71 (WebKit::WebPlatformStrategies::deleteCookie): 72 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: 73 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: 74 (WebKit::privateSession): 75 (WebKit::identifierBase): 76 (WebKit::WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase): 77 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): 78 (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession): 79 (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): 80 (WebKit::WebFrameNetworkingContext::storageSession): 81 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: 82 (WebKit::privateSession): 83 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): 84 (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession): 85 (WebKit::WebFrameNetworkingContext::storageSession): 86 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: 87 * WebProcess/WebProcess.cpp: 88 (WebKit::WebProcess::initializeWebProcess): 89 (WebKit::WebProcess::ensurePrivateBrowsingSession): 90 (WebKit::WebProcess::destroyPrivateBrowsingSession): 91 * WebProcess/WebProcess.h: 92 * WebProcess/WebProcess.messages.in: 93 1 94 2014-01-17 Ryuan Choi <ryuan.choi@samsung.com> 2 95 -
trunk/Source/WebKit2/GNUmakefile.list.am
r162237 r162245 443 443 Source/WebKit2/Shared/SessionState.cpp \ 444 444 Source/WebKit2/Shared/SessionState.h \ 445 Source/WebKit2/Shared/SessionTracker.cpp \446 Source/WebKit2/Shared/SessionTracker.h \447 445 Source/WebKit2/Shared/StatisticsData.cpp \ 448 446 Source/WebKit2/Shared/StatisticsData.h \ -
trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
r162237 r162245 38 38 #include "NetworkResourceLoaderMessages.h" 39 39 #include "RemoteNetworkingContext.h" 40 #include "SessionTracker.h"41 40 #include <WebCore/BlobData.h> 42 41 #include <WebCore/PlatformCookieJar.h> … … 149 148 } 150 149 151 static NetworkStorageSession& storageSession( uint64_t sessionID)152 { 153 if ( SessionTracker::isEphemeralID(sessionID)) {154 NetworkStorageSession* privateSession = SessionTracker::session(sessionID).get();150 static NetworkStorageSession& storageSession(bool privateBrowsingEnabled) 151 { 152 if (privateBrowsingEnabled) { 153 NetworkStorageSession* privateSession = RemoteNetworkingContext::privateBrowsingSession(); 155 154 if (privateSession) 156 155 return *privateSession; … … 162 161 } 163 162 164 void NetworkConnectionToWebProcess::startDownload( uint64_t sessionID, uint64_t downloadID, const ResourceRequest& request)165 { 166 // FIXME: Do something with the session ID.163 void NetworkConnectionToWebProcess::startDownload(bool privateBrowsingEnabled, uint64_t downloadID, const ResourceRequest& request) 164 { 165 // FIXME: Do something with the private browsing flag. 167 166 NetworkProcess::shared().downloadManager().startDownload(downloadID, request); 168 167 } … … 184 183 } 185 184 186 void NetworkConnectionToWebProcess::cookiesForDOM( uint64_t sessionID, const URL& firstParty, const URL& url, String& result)187 { 188 result = WebCore::cookiesForDOM(storageSession( sessionID), firstParty, url);189 } 190 191 void NetworkConnectionToWebProcess::setCookiesFromDOM( uint64_t sessionID, const URL& firstParty, const URL& url, const String& cookieString)192 { 193 WebCore::setCookiesFromDOM(storageSession( sessionID), firstParty, url, cookieString);194 } 195 196 void NetworkConnectionToWebProcess::cookiesEnabled( uint64_t sessionID, const URL& firstParty, const URL& url, bool& result)197 { 198 result = WebCore::cookiesEnabled(storageSession( sessionID), firstParty, url);199 } 200 201 void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue( uint64_t sessionID, const URL& firstParty, const URL& url, String& result)202 { 203 result = WebCore::cookieRequestHeaderFieldValue(storageSession( sessionID), firstParty, url);204 } 205 206 void NetworkConnectionToWebProcess::getRawCookies( uint64_t sessionID, const URL& firstParty, const URL& url, Vector<Cookie>& result)207 { 208 WebCore::getRawCookies(storageSession( sessionID), firstParty, url, result);209 } 210 211 void NetworkConnectionToWebProcess::deleteCookie( uint64_t sessionID, const URL& url, const String& cookieName)212 { 213 WebCore::deleteCookie(storageSession( sessionID), url, cookieName);185 void NetworkConnectionToWebProcess::cookiesForDOM(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, String& result) 186 { 187 result = WebCore::cookiesForDOM(storageSession(privateBrowsingEnabled), firstParty, url); 188 } 189 190 void NetworkConnectionToWebProcess::setCookiesFromDOM(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, const String& cookieString) 191 { 192 WebCore::setCookiesFromDOM(storageSession(privateBrowsingEnabled), firstParty, url, cookieString); 193 } 194 195 void NetworkConnectionToWebProcess::cookiesEnabled(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, bool& result) 196 { 197 result = WebCore::cookiesEnabled(storageSession(privateBrowsingEnabled), firstParty, url); 198 } 199 200 void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, String& result) 201 { 202 result = WebCore::cookieRequestHeaderFieldValue(storageSession(privateBrowsingEnabled), firstParty, url); 203 } 204 205 void NetworkConnectionToWebProcess::getRawCookies(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, Vector<Cookie>& result) 206 { 207 WebCore::getRawCookies(storageSession(privateBrowsingEnabled), firstParty, url, result); 208 } 209 210 void NetworkConnectionToWebProcess::deleteCookie(bool privateBrowsingEnabled, const URL& url, const String& cookieName) 211 { 212 WebCore::deleteCookie(storageSession(privateBrowsingEnabled), url, cookieName); 214 213 } 215 214 -
trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h
r162237 r162245 77 77 void servePendingRequests(uint32_t resourceLoadPriority); 78 78 void setSerialLoadingEnabled(bool); 79 void startDownload( uint64_t sessionID, uint64_t downloadID, const WebCore::ResourceRequest&);79 void startDownload(bool privateBrowsingEnabled, uint64_t downloadID, const WebCore::ResourceRequest&); 80 80 void convertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&); 81 81 82 void cookiesForDOM( uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result);83 void setCookiesFromDOM( uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, const String&);84 void cookiesEnabled( uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, bool& result);85 void cookieRequestHeaderFieldValue( uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result);86 void getRawCookies( uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);87 void deleteCookie( uint64_t sessionID, const WebCore::URL&, const String& cookieName);82 void cookiesForDOM(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, String& result); 83 void setCookiesFromDOM(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, const String&); 84 void cookiesEnabled(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, bool& result); 85 void cookieRequestHeaderFieldValue(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, String& result); 86 void getRawCookies(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&); 87 void deleteCookie(bool privateBrowsingEnabled, const WebCore::URL&, const String& cookieName); 88 88 89 89 void registerBlobURL(const WebCore::URL&, const BlobRegistrationData&); -
trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in
r162237 r162245 33 33 SetSerialLoadingEnabled(bool enabled) -> () 34 34 35 StartDownload( uint64_t sessionID, uint64_t downloadID, WebCore::ResourceRequest request)35 StartDownload(bool privateBrowsingEnabled, uint64_t downloadID, WebCore::ResourceRequest request) 36 36 ConvertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response) 37 37 38 CookiesForDOM( uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url) -> (String result)39 SetCookiesFromDOM( uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url, String cookieString)40 CookiesEnabled( uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url) -> (bool enabled)41 CookieRequestHeaderFieldValue( uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url) -> (String result)42 GetRawCookies( uint64_t sessionID, WebCore::URL firstParty, WebCore::URL url) -> (Vector<WebCore::Cookie> cookies)43 DeleteCookie( uint64_t sessionID, WebCore::URL url, String cookieName)38 CookiesForDOM(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url) -> (String result) 39 SetCookiesFromDOM(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url, String cookieString) 40 CookiesEnabled(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url) -> (bool enabled) 41 CookieRequestHeaderFieldValue(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url) -> (String result) 42 GetRawCookies(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url) -> (Vector<WebCore::Cookie> cookies) 43 DeleteCookie(bool privateBrowsingEnabled, WebCore::URL url, String cookieName) 44 44 45 45 RegisterBlobURL(WebCore::URL url, WebKit::BlobRegistrationData data) -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp
r162237 r162245 40 40 #include "NetworkResourceLoader.h" 41 41 #include "RemoteNetworkingContext.h" 42 #include "SessionTracker.h"43 42 #include "StatisticsData.h" 44 43 #include "WebContextMessages.h" … … 159 158 160 159 #if PLATFORM(MAC) || USE(CFNETWORK) 161 SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier); 162 #endif 163 164 // FIXME: instead of handling this here, a message should be sent later (scales to multiple sessions) 160 RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase(parameters.uiProcessBundleIdentifier); 161 #endif 162 165 163 if (parameters.privateBrowsingEnabled) 166 RemoteNetworkingContext::ensurePrivateBrowsingSession( SessionTracker::legacyPrivateSessionID);164 RemoteNetworkingContext::ensurePrivateBrowsingSession(); 167 165 168 166 if (parameters.shouldUseTestingNetworkSession) … … 215 213 } 216 214 217 void NetworkProcess::ensurePrivateBrowsingSession( uint64_t sessionID)218 { 219 RemoteNetworkingContext::ensurePrivateBrowsingSession( sessionID);220 } 221 222 void NetworkProcess::destroyPrivateBrowsingSession( uint64_t sessionID)223 { 224 SessionTracker::destroySession(sessionID);215 void NetworkProcess::ensurePrivateBrowsingSession() 216 { 217 RemoteNetworkingContext::ensurePrivateBrowsingSession(); 218 } 219 220 void NetworkProcess::destroyPrivateBrowsingSession() 221 { 222 RemoteNetworkingContext::destroyPrivateBrowsingSession(); 225 223 } 226 224 -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h
r162237 r162245 105 105 void initializeNetworkProcess(const NetworkProcessCreationParameters&); 106 106 void createNetworkConnectionToWebProcess(); 107 void ensurePrivateBrowsingSession( uint64_t sessionID);108 void destroyPrivateBrowsingSession( uint64_t sessionID);107 void ensurePrivateBrowsingSession(); 108 void destroyPrivateBrowsingSession(); 109 109 void downloadRequest(uint64_t downloadID, const WebCore::ResourceRequest&); 110 110 void cancelDownload(uint64_t downloadID); -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in
r162237 r162245 35 35 #endif 36 36 37 EnsurePrivateBrowsingSession( uint64_t sessionID)38 DestroyPrivateBrowsingSession( uint64_t sessionID)37 EnsurePrivateBrowsingSession() 38 DestroyPrivateBrowsingSession() 39 39 40 40 DownloadRequest(uint64_t downloadID, WebCore::ResourceRequest request) -
trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h
r162237 r162245 40 40 virtual ~RemoteNetworkingContext(); 41 41 42 // FIXME: remove platform-specific code and use SessionTracker 43 static void ensurePrivateBrowsingSession(uint64_t sessionID); 42 static void setPrivateBrowsingStorageSessionIdentifierBase(const String&); 43 static void ensurePrivateBrowsingSession(); 44 static void destroyPrivateBrowsingSession(); 45 46 static WebCore::NetworkStorageSession* privateBrowsingSession(); 44 47 45 48 virtual bool shouldClearReferrerOnHTTPSToHTTPRedirect() const override { return m_shouldClearReferrerOnHTTPSToHTTPRedirect; } -
trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm
r162237 r162245 27 27 #import "RemoteNetworkingContext.h" 28 28 29 #import "SessionTracker.h"30 29 #import "WebErrors.h" 31 30 #import <WebCore/ResourceError.h> … … 38 37 namespace WebKit { 39 38 39 static std::unique_ptr<NetworkStorageSession>& privateBrowsingStorageSession() 40 { 41 ASSERT(isMainThread()); 42 static NeverDestroyed<std::unique_ptr<NetworkStorageSession>> session; 43 return session; 44 } 40 45 41 46 RemoteNetworkingContext::~RemoteNetworkingContext() … … 61 66 { 62 67 if (m_privateBrowsingEnabled) { 63 NetworkStorageSession* privateSession = SessionTracker::session(SessionTracker::legacyPrivateSessionID).get();68 NetworkStorageSession* privateSession = privateBrowsingStorageSession().get(); 64 69 if (privateSession) 65 70 return *privateSession; … … 70 75 71 76 return NetworkStorageSession::defaultStorageSession(); 77 } 78 79 NetworkStorageSession* RemoteNetworkingContext::privateBrowsingSession() 80 { 81 return privateBrowsingStorageSession().get(); 72 82 } 73 83 … … 82 92 } 83 93 84 void RemoteNetworkingContext::ensurePrivateBrowsingSession(uint64_t sessionID)94 static String& privateBrowsingStorageSessionIdentifierBase() 85 95 { 86 if (SessionTracker::session(sessionID)) 96 ASSERT(isMainThread()); 97 static NeverDestroyed<String> base; 98 return base; 99 } 100 101 void RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase(const String& identifier) 102 { 103 privateBrowsingStorageSessionIdentifierBase() = identifier; 104 } 105 106 void RemoteNetworkingContext::ensurePrivateBrowsingSession() 107 { 108 if (privateBrowsingStorageSession()) 87 109 return; 88 110 89 ASSERT(!SessionTracker::getIdentifierBase().isNull()); 90 SessionTracker::session(sessionID) = NetworkStorageSession::createPrivateBrowsingSession(SessionTracker::getIdentifierBase() + '.' + String::number(sessionID)); 111 ASSERT(!privateBrowsingStorageSessionIdentifierBase().isNull()); 112 RetainPtr<CFStringRef> cfIdentifier = String(privateBrowsingStorageSessionIdentifierBase() + ".PrivateBrowsing").createCFString(); 113 114 privateBrowsingStorageSession() = std::move(NetworkStorageSession::createPrivateBrowsingSession(privateBrowsingStorageSessionIdentifierBase())); 115 } 116 117 void RemoteNetworkingContext::destroyPrivateBrowsingSession() 118 { 119 privateBrowsingStorageSession() = nullptr; 91 120 } 92 121 -
trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
r162237 r162245 53 53 } 54 54 55 void RemoteNetworkingContext:: ensurePrivateBrowsingSession(uint64_t sessionID)55 void RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase(const String&) 56 56 { 57 57 notImplemented(); 58 } 59 60 void RemoteNetworkingContext::ensurePrivateBrowsingSession() 61 { 62 notImplemented(); 63 } 64 65 void RemoteNetworkingContext::destroyPrivateBrowsingSession() 66 { 58 67 } 59 68 … … 63 72 } 64 73 74 NetworkStorageSession* RemoteNetworkingContext::privateBrowsingSession() 75 { 76 notImplemented(); 77 return &NetworkStorageSession::defaultStorageSession(); 78 } 79 65 80 } 66 81 -
trunk/Source/WebKit2/UIProcess/APISession.cpp
r162237 r162245 27 27 #include "APISession.h" 28 28 29 #include <wtf/MainThread.h>30 31 29 namespace API { 32 33 static uint64_t generateID(bool isEphemeral)34 {35 ASSERT(isMainThread());36 37 static uint64_t uniqueSessionID = WebKit::SessionTracker::legacyPrivateSessionID;38 ASSERT(isEphemeral);39 return ++uniqueSessionID;40 }41 42 Session& Session::defaultSession()43 {44 ASSERT(isMainThread());45 46 static Session* defaultSession = new Session(false, WebKit::SessionTracker::defaultSessionID);47 return *defaultSession;48 }49 50 Session& Session::legacyPrivateSession()51 {52 ASSERT(isMainThread());53 54 static Session* legacyPrivateSession = new Session(true, WebKit::SessionTracker::legacyPrivateSessionID);55 return *legacyPrivateSession;56 }57 30 58 31 Session::Session(bool isEphemeral) 59 32 : m_isEphemeral(isEphemeral) 60 , m_sessionID(generateID(isEphemeral))61 {62 }63 64 Session::Session(bool isEphemeral, uint64_t sessionID)65 : m_isEphemeral(isEphemeral)66 , m_sessionID(sessionID)67 33 { 68 34 } … … 70 36 PassRefPtr<Session> Session::create(bool isEphemeral) 71 37 { 72 // FIXME: support creation of non-default, non-ephemeral sessions73 38 return adoptRef(new Session(isEphemeral)); 74 39 } 75 40 76 bool Session::isEphemeral() const41 bool Session::isEphemeral() 77 42 { 78 43 return m_isEphemeral; 79 }80 81 uint64_t Session::getID() const82 {83 return m_sessionID;84 44 } 85 45 -
trunk/Source/WebKit2/UIProcess/APISession.h
r162237 r162245 28 28 29 29 #include "APIObject.h" 30 #include "SessionTracker.h"31 30 #include <wtf/PassRefPtr.h> 32 31 … … 36 35 public: 37 36 static PassRefPtr<Session> create(bool isEphemeral); 38 static Session& defaultSession(); 39 static Session& legacyPrivateSession(); 40 bool isEphemeral() const; 41 uint64_t getID() const; 37 bool isEphemeral(); 42 38 virtual ~Session(); 43 39 44 40 private: 45 41 explicit Session(bool isEphemeral); 46 Session(bool isEphemeral, uint64_t sessionID);47 42 bool m_isEphemeral; 48 uint64_t m_sessionID;49 43 }; 50 44 -
trunk/Source/WebKit2/UIProcess/WebContext.cpp
r162237 r162245 33 33 #include "MutableDictionary.h" 34 34 #include "SandboxExtension.h" 35 #include "SessionTracker.h"36 35 #include "StatisticsData.h" 37 36 #include "TextChecker.h" … … 469 468 if (usesNetworkProcess() && networkProcess()) { 470 469 if (privateBrowsingEnabled) 471 networkProcess()->send(Messages::NetworkProcess::EnsurePrivateBrowsingSession( SessionTracker::legacyPrivateSessionID), 0);470 networkProcess()->send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(), 0); 472 471 else 473 networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession( SessionTracker::legacyPrivateSessionID), 0);472 networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(), 0); 474 473 } 475 474 #endif // ENABLED(NETWORK_PROCESS) 476 475 477 476 if (privateBrowsingEnabled) 478 sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession( SessionTracker::legacyPrivateSessionID));477 sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession()); 479 478 else 480 sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession( SessionTracker::legacyPrivateSessionID));479 sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession()); 481 480 } 482 481 … … 599 598 600 599 if (WebPreferences::anyPageGroupsAreUsingPrivateBrowsing()) 601 process->send(Messages::WebProcess::EnsurePrivateBrowsingSession( SessionTracker::legacyPrivateSessionID), 0);600 process->send(Messages::WebProcess::EnsurePrivateBrowsingSession(), 0); 602 601 603 602 m_processes.append(process); … … 742 741 } 743 742 744 PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient& pageClient, WebPageGroup* pageGroup, API::Session& session,WebPageProxy* relatedPage)743 PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient& pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage) 745 744 { 746 745 RefPtr<WebProcessProxy> process; … … 758 757 } 759 758 760 return process->createWebPage(pageClient, pageGroup ? *pageGroup : m_defaultPageGroup.get(), session); 761 } 762 763 PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient& pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage) 764 { 765 return createWebPage(pageClient, pageGroup, pageGroup->preferences()->privateBrowsingEnabled() ? API::Session::legacyPrivateSession() : API::Session::defaultSession(), relatedPage); 759 return process->createWebPage(pageClient, pageGroup ? *pageGroup : m_defaultPageGroup.get()); 766 760 } 767 761 -
trunk/Source/WebKit2/UIProcess/WebContext.h
r162237 r162245 150 150 StorageManager& storageManager() const { return *m_storageManager; } 151 151 152 PassRefPtr<WebPageProxy> createWebPage(PageClient&, WebPageGroup*, API::Session&, WebPageProxy* relatedPage = 0);153 152 PassRefPtr<WebPageProxy> createWebPage(PageClient&, WebPageGroup*, WebPageProxy* relatedPage = 0); 154 153 … … 293 292 static void willStartUsingPrivateBrowsing(); 294 293 static void willStopUsingPrivateBrowsing(); 295 296 static bool isEphemeralSession(uint64_t sessionID);297 294 298 295 #if USE(SOUP) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r162237 r162245 229 229 #endif // !LOG_DISABLED 230 230 231 PassRefPtr<WebPageProxy> WebPageProxy::create(PageClient& pageClient, WebProcessProxy& process, WebPageGroup& pageGroup, API::Session& session,uint64_t pageID)232 { 233 return adoptRef(new WebPageProxy(pageClient, process, pageGroup, session,pageID));234 } 235 236 WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, WebPageGroup& pageGroup, API::Session& session,uint64_t pageID)231 PassRefPtr<WebPageProxy> WebPageProxy::create(PageClient& pageClient, WebProcessProxy& process, WebPageGroup& pageGroup, uint64_t pageID) 232 { 233 return adoptRef(new WebPageProxy(pageClient, process, pageGroup, pageID)); 234 } 235 236 WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, WebPageGroup& pageGroup, uint64_t pageID) 237 237 : m_pageClient(pageClient) 238 238 , m_process(process) … … 280 280 #endif 281 281 , m_pageID(pageID) 282 , m_session(session)283 282 , m_isPageSuspended(false) 284 283 #if PLATFORM(MAC) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r162237 r162245 28 28 29 29 #include "APIObject.h" 30 #include "APISession.h"31 30 #include "AutoCorrectionCallback.h" 32 31 #include "Connection.h" … … 76 75 #include <wtf/PassOwnPtr.h> 77 76 #include <wtf/PassRefPtr.h> 78 #include <wtf/Ref.h>79 77 #include <wtf/RefPtr.h> 80 78 #include <wtf/Vector.h> … … 330 328 public: 331 329 332 static PassRefPtr<WebPageProxy> create(PageClient&, WebProcessProxy&, WebPageGroup&, API::Session&,uint64_t pageID);330 static PassRefPtr<WebPageProxy> create(PageClient&, WebProcessProxy&, WebPageGroup&, uint64_t pageID); 333 331 virtual ~WebPageProxy(); 334 332 335 333 uint64_t pageID() const { return m_pageID; } 336 uint64_t sessionID() const { return m_session->getID(); }337 334 338 335 WebFrameProxy* mainFrame() const { return m_mainFrame.get(); } … … 859 856 860 857 private: 861 WebPageProxy(PageClient&, WebProcessProxy&, WebPageGroup&, API::Session&,uint64_t pageID);858 WebPageProxy(PageClient&, WebProcessProxy&, WebPageGroup&, uint64_t pageID); 862 859 void platformInitialize(); 863 860 … … 1316 1313 1317 1314 uint64_t m_pageID; 1318 Ref<API::Session> m_session;1319 1315 1320 1316 bool m_isPageSuspended; -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r162237 r162245 168 168 } 169 169 170 PassRefPtr<WebPageProxy> WebProcessProxy::createWebPage(PageClient& pageClient, WebPageGroup& pageGroup , API::Session& session)170 PassRefPtr<WebPageProxy> WebProcessProxy::createWebPage(PageClient& pageClient, WebPageGroup& pageGroup) 171 171 { 172 172 uint64_t pageID = generatePageID(); 173 RefPtr<WebPageProxy> webPage = WebPageProxy::create(pageClient, *this, pageGroup, session,pageID);173 RefPtr<WebPageProxy> webPage = WebPageProxy::create(pageClient, *this, pageGroup, pageID); 174 174 m_pageMap.set(pageID, webPage.get()); 175 175 globalPageMap().set(pageID, webPage.get()); -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.h
r162237 r162245 27 27 #define WebProcessProxy_h 28 28 29 #include "APISession.h"30 29 #include "ChildProcessProxy.h" 31 30 #include "MessageReceiverMap.h" … … 79 78 80 79 static WebPageProxy* webPage(uint64_t pageID); 81 PassRefPtr<WebPageProxy> createWebPage(PageClient&, WebPageGroup& , API::Session&);80 PassRefPtr<WebPageProxy> createWebPage(PageClient&, WebPageGroup&); 82 81 void addExistingWebPage(WebPageProxy*, uint64_t pageID); 83 82 void removeWebPage(uint64_t pageID); -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r162237 r162245 786 786 728E86F11795188C0087879E /* WebColorPickerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 728E86EF1795188C0087879E /* WebColorPickerMac.h */; }; 787 787 728E86F21795188C0087879E /* WebColorPickerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 728E86F01795188C0087879E /* WebColorPickerMac.mm */; }; 788 753E3E0D1887398500188496 /* SessionTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 753E3E0B1887397300188496 /* SessionTracker.cpp */; };789 753E3E0E1887398900188496 /* SessionTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 753E3E091887394B00188496 /* SessionTracker.h */; };790 788 755422BD18062BB20046F6A8 /* WKOriginDataManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 755422B918062B9C0046F6A8 /* WKOriginDataManager.cpp */; }; 791 789 755422C418062BF90046F6A8 /* WebOriginDataManagerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 755422BE18062BE40046F6A8 /* WebOriginDataManagerProxy.cpp */; }; … … 2467 2465 728E86EF1795188C0087879E /* WebColorPickerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPickerMac.h; sourceTree = "<group>"; }; 2468 2466 728E86F01795188C0087879E /* WebColorPickerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebColorPickerMac.mm; sourceTree = "<group>"; }; 2469 753E3E091887394B00188496 /* SessionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionTracker.h; sourceTree = "<group>"; };2470 753E3E0B1887397300188496 /* SessionTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionTracker.cpp; sourceTree = "<group>"; };2471 2467 755422B918062B9C0046F6A8 /* WKOriginDataManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKOriginDataManager.cpp; sourceTree = "<group>"; }; 2472 2468 755422BA18062B9C0046F6A8 /* WKOriginDataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOriginDataManager.h; sourceTree = "<group>"; }; … … 3729 3725 518D2CC812D51DFB003BB93B /* SessionState.cpp */, 3730 3726 518D2CC912D51DFB003BB93B /* SessionState.h */, 3731 753E3E0B1887397300188496 /* SessionTracker.cpp */,3732 753E3E091887394B00188496 /* SessionTracker.h */,3733 3727 1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */, 3734 3728 1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */, … … 6652 6646 BC40760C124FF0270068F20A /* WKURLRequest.h in Headers */, 6653 6647 BC407629124FF0400068F20A /* WKURLRequestNS.h in Headers */, 6654 753E3E0E1887398900188496 /* SessionTracker.h in Headers */,6655 6648 BC40760E124FF0270068F20A /* WKURLResponse.h in Headers */, 6656 6649 759CCD5A1808F6160078E8A8 /* WebOriginDataManagerProxy.h in Headers */, … … 7911 7904 BC498630124D18C100D834E1 /* WKBundleHitTestResult.cpp in Sources */, 7912 7905 6501BD1A12F1243400E9F248 /* WKBundleInspector.cpp in Sources */, 7913 753E3E0D1887398500188496 /* SessionTracker.cpp in Sources */,7914 7906 BC7043CD12F75EE0006472B9 /* WKBundleNavigationAction.cpp in Sources */, 7915 7907 BC4BEFE2120A1A4C00FBA0C7 /* WKBundleNodeHandle.cpp in Sources */, -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
r162237 r162245 33 33 #include "LayerTreeHost.h" 34 34 #include "NotificationPermissionRequestManager.h" 35 #include "SessionTracker.h"36 35 #include "WKAPICast.h" 37 36 #include "WKBundleAPICast.h" … … 301 300 #if PLATFORM(MAC) || USE(CFNETWORK) || USE(SOUP) 302 301 if (enabled) 303 WebFrameNetworkingContext::ensurePrivateBrowsingSession( SessionTracker::legacyPrivateSessionID);302 WebFrameNetworkingContext::ensurePrivateBrowsingSession(); 304 303 else 305 SessionTracker::destroySession(SessionTracker::legacyPrivateSessionID);304 WebFrameNetworkingContext::destroyPrivateBrowsingSession(); 306 305 #endif 307 306 const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages(); -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r162241 r162245 31 31 #include "NetworkResourceLoadParameters.h" 32 32 #include "PluginInfoStore.h" 33 #include "SessionTracker.h"34 33 #include "StorageNamespaceImpl.h" 35 34 #include "WebContextMessages.h" … … 74 73 namespace WebKit { 75 74 76 #if ENABLE(NETWORK_PROCESS)77 static uint64_t legacySessionID(const NetworkStorageSession &session)78 {79 return session.isPrivateBrowsingSession() ? SessionTracker::legacyPrivateSessionID : SessionTracker::defaultSessionID;80 }81 #endif82 83 75 void WebPlatformStrategies::initialize() 84 76 { … … 142 134 if (WebProcess::shared().usesNetworkProcess()) { 143 135 String result; 144 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesForDOM( legacySessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(result), 0))136 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesForDOM(session.isPrivateBrowsingSession(), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(result), 0)) 145 137 return String(); 146 138 return result; … … 155 147 #if ENABLE(NETWORK_PROCESS) 156 148 if (WebProcess::shared().usesNetworkProcess()) { 157 WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::SetCookiesFromDOM( legacySessionID(session), firstParty, url, cookieString), 0);149 WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::SetCookiesFromDOM(session.isPrivateBrowsingSession(), firstParty, url, cookieString), 0); 158 150 return; 159 151 } … … 168 160 if (WebProcess::shared().usesNetworkProcess()) { 169 161 bool result; 170 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesEnabled( legacySessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesEnabled::Reply(result), 0))162 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesEnabled(session.isPrivateBrowsingSession(), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesEnabled::Reply(result), 0)) 171 163 return false; 172 164 return result; … … 182 174 if (WebProcess::shared().usesNetworkProcess()) { 183 175 String result; 184 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue( legacySessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::Reply(result), 0))176 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(session.isPrivateBrowsingSession(), firstParty, url), Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::Reply(result), 0)) 185 177 return String(); 186 178 return result; … … 195 187 #if ENABLE(NETWORK_PROCESS) 196 188 if (WebProcess::shared().usesNetworkProcess()) { 197 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::GetRawCookies( legacySessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::GetRawCookies::Reply(rawCookies), 0))189 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::GetRawCookies(session.isPrivateBrowsingSession(), firstParty, url), Messages::NetworkConnectionToWebProcess::GetRawCookies::Reply(rawCookies), 0)) 198 190 return false; 199 191 return true; … … 208 200 #if ENABLE(NETWORK_PROCESS) 209 201 if (WebProcess::shared().usesNetworkProcess()) { 210 WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::DeleteCookie( legacySessionID(session), url, cookieName), 0);202 WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::DeleteCookie(session.isPrivateBrowsingSession(), url, cookieName), 0); 211 203 return; 212 204 } -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h
r162237 r162245 40 40 } 41 41 42 // FIXME: remove platform-specific code and use SessionTracker43 static void ensurePrivateBrowsingSession( uint64_t sessionID);44 42 static void setPrivateBrowsingStorageSessionIdentifierBase(const String&); 43 static void ensurePrivateBrowsingSession(); 44 static void destroyPrivateBrowsingSession(); 45 45 static void setCookieAcceptPolicyForAllContexts(HTTPCookieAcceptPolicy); 46 46 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
r162237 r162245 25 25 26 26 #include "config.h" 27 28 #include "SessionTracker.h"29 27 #include "WebCookieManager.h" 30 28 #include "WebFrameNetworkingContext.h" … … 37 35 #include <WebCore/Settings.h> 38 36 #include <WebKitSystemInterface.h> 37 #include <wtf/NeverDestroyed.h> 39 38 40 39 using namespace WebCore; 41 40 42 41 namespace WebKit { 42 43 static std::unique_ptr<NetworkStorageSession>& privateSession() 44 { 45 static NeverDestroyed<std::unique_ptr<NetworkStorageSession>> session; 46 return session; 47 } 48 49 static String& identifierBase() 50 { 51 static NeverDestroyed<String> base; 52 return base; 53 } 43 54 44 void WebFrameNetworkingContext:: ensurePrivateBrowsingSession(uint64_t sessionID)55 void WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase(const String& base) 45 56 { 46 if (SessionTracker::session(sessionID)) 57 ASSERT(isMainThread()); 58 59 identifierBase() = base; 60 } 61 62 void WebFrameNetworkingContext::ensurePrivateBrowsingSession() 63 { 64 ASSERT(isMainThread()); 65 66 if (privateSession()) 47 67 return; 48 68 49 69 String base; 50 if ( SessionTracker::getIdentifierBase().isNull())70 if (identifierBase().isNull()) 51 71 base = [[NSBundle mainBundle] bundleIdentifier]; 52 72 else 53 base = SessionTracker::getIdentifierBase();73 base = identifierBase(); 54 74 55 SessionTracker::session(sessionID) = NetworkStorageSession::createPrivateBrowsingSession(base + '.' + String::number(sessionID)); 75 privateSession() = NetworkStorageSession::createPrivateBrowsingSession(base); 76 } 77 78 void WebFrameNetworkingContext::destroyPrivateBrowsingSession() 79 { 80 ASSERT(isMainThread()); 81 82 privateSession() = nullptr; 56 83 } 57 84 … … 63 90 WKSetHTTPCookieAcceptPolicy(cookieStorage.get(), policy); 64 91 65 for (const auto& session : SessionTracker::getSessionMap().values()) { 66 if (session) 67 WKSetHTTPCookieAcceptPolicy(session->cookieStorage().get(), policy); 68 } 92 if (privateSession()) 93 WKSetHTTPCookieAcceptPolicy(privateSession()->cookieStorage().get(), policy); 69 94 } 70 95 … … 101 126 102 127 if (frame() && frame()->settings().privateBrowsingEnabled()) 103 return * SessionTracker::session(SessionTracker::legacyPrivateSessionID);128 return *privateSession(); 104 129 105 130 return NetworkStorageSession::defaultStorageSession(); 106 131 } 132 107 133 WebFrameLoaderClient* WebFrameNetworkingContext::webFrameLoaderClient() const 108 134 { -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
r162237 r162245 28 28 #include "WebFrameNetworkingContext.h" 29 29 30 #include "SessionTracker.h"31 30 #include "WebFrame.h" 32 31 #include "WebPage.h" … … 38 37 namespace WebKit { 39 38 40 void WebFrameNetworkingContext::ensurePrivateBrowsingSession(uint64_t sessionID) 39 static std::unique_ptr<NetworkStorageSession>& privateSession() 40 { 41 static NeverDestroyed<std::unique_ptr<NetworkStorageSession>> session; 42 return session; 43 } 44 45 void WebFrameNetworkingContext::ensurePrivateBrowsingSession() 41 46 { 42 47 ASSERT(isMainThread()); 43 48 44 if ( SessionTracker::session(sessionID))49 if (privateSession()) 45 50 return; 46 51 47 SessionTracker::session(sessionID) = NetworkStorageSession::createPrivateBrowsingSession(String::number(sessionID)); 52 privateSession() = NetworkStorageSession::createPrivateBrowsingSession(); 53 } 54 55 void WebFrameNetworkingContext::destroyPrivateBrowsingSession() 56 { 57 ASSERT(isMainThread()); 58 59 privateSession() = nullptr; 48 60 } 49 61 … … 59 71 { 60 72 if (frame() && frame()->settings().privateBrowsingEnabled()) 61 return * SessionTracker::session(SessionTracker::legacyPrivateSessionID);73 return *privateSession(); 62 74 63 75 return NetworkStorageSession::defaultStorageSession(); -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h
r162237 r162245 43 43 } 44 44 45 static void ensurePrivateBrowsingSession(uint64_t sessionID); 45 static void ensurePrivateBrowsingSession(); 46 static void destroyPrivateBrowsingSession(); 46 47 47 48 WebFrameLoaderClient* webFrameLoaderClient() const; -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r162237 r162245 34 34 #include "Logging.h" 35 35 #include "PluginProcessConnectionManager.h" 36 #include "SessionTracker.h"37 36 #include "StatisticsData.h" 38 37 #include "UserData.h" … … 337 336 338 337 #if PLATFORM(MAC) || USE(CFNETWORK) 339 SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier);338 WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase(parameters.uiProcessBundleIdentifier); 340 339 #endif 341 340 … … 454 453 } 455 454 456 void WebProcess::ensurePrivateBrowsingSession( uint64_t sessionID)455 void WebProcess::ensurePrivateBrowsingSession() 457 456 { 458 457 #if PLATFORM(MAC) || USE(CFNETWORK) || USE(SOUP) 459 WebFrameNetworkingContext::ensurePrivateBrowsingSession( sessionID);460 #endif 461 } 462 463 void WebProcess::destroyPrivateBrowsingSession( uint64_t sessionID)458 WebFrameNetworkingContext::ensurePrivateBrowsingSession(); 459 #endif 460 } 461 462 void WebProcess::destroyPrivateBrowsingSession() 464 463 { 465 464 #if PLATFORM(MAC) || USE(CFNETWORK) || USE(SOUP) 466 SessionTracker::destroySession(sessionID);465 WebFrameNetworkingContext::destroyPrivateBrowsingSession(); 467 466 #endif 468 467 } -
trunk/Source/WebKit2/WebProcess/WebProcess.h
r162237 r162245 166 166 void setCacheModel(uint32_t); 167 167 168 void ensurePrivateBrowsingSession( uint64_t sessionID);169 void destroyPrivateBrowsingSession( uint64_t sessionID);170 168 void ensurePrivateBrowsingSession(); 169 void destroyPrivateBrowsingSession(); 170 171 171 void pageDidEnterWindow(uint64_t pageID); 172 172 void pageWillLeaveWindow(uint64_t pageID); -
trunk/Source/WebKit2/WebProcess/WebProcess.messages.in
r162237 r162245 52 52 #endif 53 53 54 // Legacy private browsing session is per process. Individual pages or page groups may use the private session or the default one as appropriate.55 EnsurePrivateBrowsingSession( uint64_t sessionID)56 DestroyPrivateBrowsingSession( uint64_t sessionID)54 // Private browsing session is per process. Individual pages or page groups may use the private session or the default one as appropriate. 55 EnsurePrivateBrowsingSession() 56 DestroyPrivateBrowsingSession() 57 57 58 58 # Plug-ins.
Note: See TracChangeset
for help on using the changeset viewer.