Changeset 239815 in webkit
- Timestamp:
- Jan 9, 2019, 7:08:07 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 deleted
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r239792 r239815 1 2019-01-09 Alex Christensen <achristensen@webkit.org> 2 3 Replace SessionTracker with HashMap member of NetworkProcess 4 https://bugs.webkit.org/show_bug.cgi?id=193266 5 6 Reviewed by Joseph Pecoraro. 7 8 * NetworkProcess/Downloads/DownloadManager.cpp: 9 (WebKit::DownloadManager::startDownload): 10 * NetworkProcess/Downloads/DownloadManager.h: 11 * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: 12 (WebKit::Download::resume): 13 * NetworkProcess/NetworkCORSPreflightChecker.cpp: 14 (WebKit::NetworkCORSPreflightChecker::startPreflight): 15 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 16 (WebKit::NetworkConnectionToWebProcess::preconnectTo): 17 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): 18 (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): 19 (WebKit::NetworkConnectionToWebProcess::destroyLegacyPrivateBrowsingSession): 20 * NetworkProcess/NetworkConnectionToWebProcess.h: 21 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 22 * NetworkProcess/NetworkProcess.cpp: 23 (WebKit::NetworkProcess::initializeNetworkProcess): 24 (WebKit::NetworkProcess::clearCachedCredentials): 25 (WebKit::NetworkProcess::networkSession): 26 (WebKit::NetworkProcess::setSession): 27 (WebKit::NetworkProcess::destroySession): 28 (WebKit::NetworkProcess::preconnectTo): 29 * NetworkProcess/NetworkProcess.h: 30 * NetworkProcess/NetworkResourceLoader.cpp: 31 (WebKit::NetworkResourceLoader::startNetworkLoad): 32 (WebKit::NetworkResourceLoader::didFinishLoading): 33 (WebKit::NetworkResourceLoader::sendResultForCacheEntry): 34 (WebKit::NetworkResourceLoader::shouldLogCookieInformation): 35 (WebKit::NetworkResourceLoader::logCookieInformation const): 36 (WebKit::logBlockedCookieInformation): 37 (WebKit::logCookieInformationInternal): 38 (WebKit::NetworkResourceLoader::logCookieInformation): 39 * NetworkProcess/NetworkResourceLoader.h: 40 * NetworkProcess/PingLoad.cpp: 41 (WebKit::PingLoad::loadRequest): 42 * NetworkProcess/PingLoad.h: 43 * NetworkProcess/PreconnectTask.cpp: 44 (WebKit::PreconnectTask::PreconnectTask): 45 * NetworkProcess/PreconnectTask.h: 46 * NetworkProcess/RemoteNetworkingContext.h: 47 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: 48 (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad): 49 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: 50 * NetworkProcess/cocoa/NetworkProcessCocoa.mm: 51 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 52 * NetworkProcess/mac/RemoteNetworkingContext.mm: 53 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): 54 * Shared/SessionTracker.cpp: Removed. 55 * Shared/SessionTracker.h: Removed. 56 * Sources.txt: 57 * WebKit.xcodeproj/project.pbxproj: 58 * WebProcess/InjectedBundle/InjectedBundle.cpp: 59 (WebKit::InjectedBundle::setPrivateBrowsingEnabled): 60 * WebProcess/Network/WebLoaderStrategy.cpp: 61 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 62 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: 63 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: 64 * WebProcess/WebPage/WebPage.cpp: 65 * WebProcess/WebProcess.cpp: 66 (WebKit::WebProcess::destroyLegacyPrivateBrowsingSessionInNetworkProcess): 67 * WebProcess/WebProcess.h: 68 * WebProcess/cocoa/WebProcessCocoa.mm: 69 1 70 2019-01-09 Alex Christensen <achristensen@webkit.org> 2 71 -
trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp
r239699 r239815 32 32 #include "NetworkSession.h" 33 33 #include "PendingDownload.h" 34 #include "SessionTracker.h"35 34 #include <WebCore/NotImplemented.h> 36 35 #include <pal/SessionID.h> … … 47 46 void DownloadManager::startDownload(NetworkConnectionToWebProcess* connection, PAL::SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName) 48 47 { 49 auto* networkSession = SessionTracker::networkSession(sessionID);48 auto* networkSession = client().networkSession(sessionID); 50 49 if (!networkSession) 51 50 return; -
trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h
r239699 r239815 73 73 virtual AuthenticationManager& downloadsAuthenticationManager() = 0; 74 74 virtual void pendingDownloadCanceled(DownloadID) = 0; 75 virtual NetworkSession* networkSession(const PAL::SessionID&) const = 0; 75 76 virtual void ref() const = 0; 76 77 virtual void deref() const = 0; -
trunk/Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm
r238771 r239815 29 29 #import "DataReference.h" 30 30 #import "NetworkSessionCocoa.h" 31 #import "SessionTracker.h"32 31 #import "WKDownloadProgress.h" 33 32 #import <pal/spi/cf/CFNetworkSPI.h> … … 42 41 m_sandboxExtension->consume(); 43 42 44 auto* networkSession = SessionTracker::networkSession(m_sessionID);43 auto* networkSession = m_downloadManager.client().networkSession(m_sessionID); 45 44 if (!networkSession) { 46 45 WTFLogAlways("Could not find network session with given session ID"); -
trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp
r239741 r239815 32 32 #include "NetworkLoadParameters.h" 33 33 #include "NetworkProcess.h" 34 #include "SessionTracker.h"35 34 #include <WebCore/CrossOriginAccessControl.h> 36 35 … … 73 72 m_loadInformation = NetworkTransactionInformation { NetworkTransactionInformation::Type::Preflight, loadParameters.request, { }, { } }; 74 73 75 if (auto* networkSession = SessionTracker::networkSession(loadParameters.sessionID)) {74 if (auto* networkSession = m_networkProcess->networkSession(loadParameters.sessionID)) { 76 75 m_task = NetworkDataTask::create(*networkSession, *this, WTFMove(loadParameters)); 77 76 m_task->resume(); -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
r239741 r239815 46 46 #include "PingLoad.h" 47 47 #include "PreconnectTask.h" 48 #include "SessionTracker.h"49 48 #include "WebCoreArgumentCoders.h" 50 49 #include "WebErrors.h" … … 392 391 { 393 392 #if ENABLE(SERVER_PRECONNECT) 394 new PreconnectTask( WTFMove(parameters), [this, protectedThis = makeRef(*this), identifier = preconnectionIdentifier] (const ResourceError& error) {393 new PreconnectTask(networkProcess(), WTFMove(parameters), [this, protectedThis = makeRef(*this), identifier = preconnectionIdentifier] (const ResourceError& error) { 395 394 didFinishPreconnection(identifier, error); 396 395 }); … … 452 451 std::tie(cookieString, secureCookiesAccessed) = networkStorageSession.cookiesForDOM(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); 453 452 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED 454 if (auto session = SessionTracker::networkSession(sessionID)) {453 if (auto session = networkProcess().networkSession(sessionID)) { 455 454 if (session->shouldLogCookieInformation()) 456 NetworkResourceLoader::logCookieInformation( "NetworkConnectionToWebProcess::cookiesForDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt);455 NetworkResourceLoader::logCookieInformation(*this, "NetworkConnectionToWebProcess::cookiesForDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt); 457 456 } 458 457 #endif … … 464 463 networkStorageSession.setCookiesFromDOM(firstParty, sameSiteInfo, url, frameID, pageID, cookieString); 465 464 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED 466 if (auto session = SessionTracker::networkSession(sessionID)) {465 if (auto session = networkProcess().networkSession(sessionID)) { 467 466 if (session->shouldLogCookieInformation()) 468 NetworkResourceLoader::logCookieInformation( "NetworkConnectionToWebProcess::setCookiesFromDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt);467 NetworkResourceLoader::logCookieInformation(*this, "NetworkConnectionToWebProcess::setCookiesFromDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt); 469 468 } 470 469 #endif … … 554 553 { 555 554 m_networkProcess->addWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters()); 555 } 556 557 void NetworkConnectionToWebProcess::destroyLegacyPrivateBrowsingSession() 558 { 559 m_networkProcess->destroySession(PAL::SessionID::legacyPrivateSessionID()); 556 560 } 557 561 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
r239680 r239815 172 172 173 173 void ensureLegacyPrivateBrowsingSession(); 174 void destroyLegacyPrivateBrowsingSession(); 174 175 175 176 #if ENABLE(INDEXED_DATABASE) -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
r239427 r239815 56 56 57 57 EnsureLegacyPrivateBrowsingSession() 58 DestroyLegacyPrivateBrowsingSession() 58 59 59 60 RemoveStorageAccessForFrame(PAL::SessionID sessionID, uint64_t frameID, uint64_t pageID); -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
r239741 r239815 50 50 #include "PreconnectTask.h" 51 51 #include "RemoteNetworkingContext.h" 52 #include "SessionTracker.h"53 52 #include "StatisticsData.h" 54 53 #include "WebCookieManager.h" … … 303 302 304 303 auto sessionID = parameters.defaultDataStoreParameters.networkSessionParameters.sessionID; 305 SessionTracker::setSession(sessionID, NetworkSession::create(*this, WTFMove(parameters.defaultDataStoreParameters.networkSessionParameters)));304 setSession(sessionID, NetworkSession::create(*this, WTFMove(parameters.defaultDataStoreParameters.networkSessionParameters))); 306 305 307 306 #if ENABLE(INDEXED_DATABASE) … … 320 319 #endif 321 320 322 auto* defaultSession = SessionTracker::networkSession(PAL::SessionID::defaultSessionID());321 auto* defaultSession = networkSession(PAL::SessionID::defaultSessionID()); 323 322 for (const auto& cookie : parameters.defaultDataStoreParameters.pendingCookies) 324 323 defaultSession->networkStorageSession().setCookie(cookie); … … 433 432 { 434 433 NetworkStorageSession::defaultStorageSession().credentialStorage().clearCredentials(); 435 if (auto* networkSession = SessionTracker::networkSession(PAL::SessionID::defaultSessionID()))434 if (auto* networkSession = this->networkSession(PAL::SessionID::defaultSessionID())) 436 435 networkSession->clearCredentials(); 437 436 else … … 453 452 } 454 453 455 void NetworkProcess::destroySession(PAL::SessionID sessionID) 456 { 457 SessionTracker::destroySession(sessionID); 454 NetworkSession* NetworkProcess::networkSession(const PAL::SessionID& sessionID) const 455 { 456 return m_networkSessions.get(sessionID); 457 } 458 459 void NetworkProcess::setSession(const PAL::SessionID& sessionID, Ref<NetworkSession>&& session) 460 { 461 m_networkSessions.set(sessionID, WTFMove(session)); 462 } 463 464 void NetworkProcess::destroySession(const PAL::SessionID& sessionID) 465 { 466 if (auto session = m_networkSessions.take(sessionID)) 467 session->get().invalidateAndCancel(); 468 NetworkStorageSession::destroySession(sessionID); 458 469 m_sessionsControlledByAutomation.remove(sessionID); 459 470 CacheStorage::Engine::destroyEngine(*this, sessionID); … … 1034 1045 parameters.shouldPreconnectOnly = PreconnectOnly::Yes; 1035 1046 1036 new PreconnectTask( WTFMove(parameters));1047 new PreconnectTask(*this, WTFMove(parameters)); 1037 1048 #else 1038 1049 UNUSED_PARAM(url); -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
r239741 r239815 126 126 NetworkCache::Cache* cache() { return m_cache.get(); } 127 127 128 void setSession(const PAL::SessionID&, Ref<NetworkSession>&&); 129 NetworkSession* networkSession(const PAL::SessionID&) const override; 130 void destroySession(const PAL::SessionID&); 131 128 132 bool canHandleHTTPSServerTrustEvaluation() const { return m_canHandleHTTPSServerTrustEvaluation; } 129 133 … … 266 270 void initializeNetworkProcess(NetworkProcessCreationParameters&&); 267 271 void createNetworkConnectionToWebProcess(bool isServiceWorkerProcess, WebCore::SecurityOriginData&&); 268 void destroySession(PAL::SessionID);269 272 270 273 void fetchWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, OptionSet<WebsiteDataFetchOption>, uint64_t callbackID); … … 376 379 377 380 HashSet<PAL::SessionID> m_sessionsControlledByAutomation; 378 379 381 HashMap<PAL::SessionID, Vector<CacheStorageParametersCallback>> m_cacheStorageParametersCallbacks; 382 HashMap<PAL::SessionID, Ref<NetworkSession>> m_networkSessions; 380 383 381 384 #if PLATFORM(COCOA) -
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
r239759 r239815 37 37 #include "NetworkProcess.h" 38 38 #include "NetworkProcessConnectionMessages.h" 39 #include "SessionTracker.h"40 39 #include "SharedBufferDataReference.h" 41 40 #include "WebCoreArgumentCoders.h" … … 285 284 parameters.blobFileReferences = NetworkBlobRegistry::singleton().filesInBlob(m_connection, originalRequest().url()); 286 285 287 auto* networkSession = SessionTracker::networkSession(parameters.sessionID);286 auto* networkSession = m_connection->networkProcess().networkSession(parameters.sessionID); 288 287 if (!networkSession && parameters.sessionID.isEphemeral()) { 289 288 m_connection->networkProcess().addWebsiteDataStore(WebsiteDataStoreParameters::privateSessionParameters(parameters.sessionID)); 290 networkSession = SessionTracker::networkSession(parameters.sessionID);289 networkSession = m_connection->networkProcess().networkSession(parameters.sessionID); 291 290 } 292 291 if (!networkSession) { … … 551 550 552 551 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED 553 if (shouldLogCookieInformation( sessionID()))552 if (shouldLogCookieInformation(m_connection, sessionID())) 554 553 logCookieInformation(); 555 554 #endif … … 851 850 852 851 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED 853 if (shouldLogCookieInformation( sessionID()))852 if (shouldLogCookieInformation(m_connection, sessionID())) 854 853 logCookieInformation(); 855 854 #endif … … 950 949 951 950 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED 952 bool NetworkResourceLoader::shouldLogCookieInformation( const PAL::SessionID& sessionID)953 { 954 if (auto session = SessionTracker::networkSession(sessionID))951 bool NetworkResourceLoader::shouldLogCookieInformation(NetworkConnectionToWebProcess& connection, const PAL::SessionID& sessionID) 952 { 953 if (auto session = connection.networkProcess().networkSession(sessionID)) 955 954 return session->shouldLogCookieInformation(); 956 955 return false; … … 969 968 void NetworkResourceLoader::logCookieInformation() const 970 969 { 971 ASSERT(shouldLogCookieInformation( sessionID()));970 ASSERT(shouldLogCookieInformation(m_connection, sessionID())); 972 971 973 972 auto networkStorageSession = WebCore::NetworkStorageSession::storageSession(sessionID()); 974 973 ASSERT(networkStorageSession); 975 974 976 logCookieInformation( "NetworkResourceLoader", reinterpret_cast<const void*>(this), *networkStorageSession, originalRequest().firstPartyForCookies(), SameSiteInfo::create(originalRequest()), originalRequest().url(), originalRequest().httpReferrer(), frameID(), pageID(), identifier());977 } 978 979 static void logBlockedCookieInformation( const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier)980 { 981 ASSERT(NetworkResourceLoader::shouldLogCookieInformation( networkStorageSession.sessionID()));975 logCookieInformation(m_connection, "NetworkResourceLoader", reinterpret_cast<const void*>(this), *networkStorageSession, originalRequest().firstPartyForCookies(), SameSiteInfo::create(originalRequest()), originalRequest().url(), originalRequest().httpReferrer(), frameID(), pageID(), identifier()); 976 } 977 978 static void logBlockedCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) 979 { 980 ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID())); 982 981 983 982 auto escapedURL = escapeForJSON(url.string()); … … 1004 1003 } 1005 1004 1006 static void logCookieInformationInternal( const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier)1007 { 1008 ASSERT(NetworkResourceLoader::shouldLogCookieInformation( networkStorageSession.sessionID()));1005 static void logCookieInformationInternal(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) 1006 { 1007 ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID())); 1009 1008 1010 1009 Vector<WebCore::Cookie> cookies; … … 1065 1064 } 1066 1065 1067 void NetworkResourceLoader::logCookieInformation( const String& label, const void* loggedObject, const NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier)1068 { 1069 ASSERT(shouldLogCookieInformation( networkStorageSession.sessionID()));1066 void NetworkResourceLoader::logCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) 1067 { 1068 ASSERT(shouldLogCookieInformation(connection, networkStorageSession.sessionID())); 1070 1069 1071 1070 if (networkStorageSession.shouldBlockCookies(firstParty, url, frameID, pageID)) 1072 logBlockedCookieInformation( label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier);1071 logBlockedCookieInformation(connection, label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier); 1073 1072 else 1074 logCookieInformationInternal( label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier);1073 logCookieInformationInternal(connection, label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier); 1075 1074 } 1076 1075 #endif -
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h
r239427 r239815 110 110 111 111 #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED 112 static bool shouldLogCookieInformation( const PAL::SessionID&);113 static void logCookieInformation( const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier);112 static bool shouldLogCookieInformation(NetworkConnectionToWebProcess&, const PAL::SessionID&); 113 static void logCookieInformation(NetworkConnectionToWebProcess&, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier); 114 114 #endif 115 115 -
trunk/Source/WebKit/NetworkProcess/PingLoad.cpp
r239741 r239815 31 31 #include "Logging.h" 32 32 #include "NetworkLoadChecker.h" 33 #include " SessionTracker.h"33 #include "NetworkProcess.h" 34 34 #include "WebErrors.h" 35 35 … … 57 57 m_timeoutTimer.startOneShot(60000_s); 58 58 59 m_networkLoadChecker->check(ResourceRequest { m_parameters.request }, nullptr, [this ] (auto&& result) {59 m_networkLoadChecker->check(ResourceRequest { m_parameters.request }, nullptr, [this, networkProcess = makeRef(networkProcess)] (auto&& result) { 60 60 WTF::switchOn(result, 61 61 [this] (ResourceError& error) { … … 66 66 ASSERT_NOT_REACHED(); 67 67 }, 68 [ this] (ResourceRequest& request) {69 this->loadRequest( WTFMove(request));68 [&] (ResourceRequest& request) { 69 this->loadRequest(networkProcess, WTFMove(request)); 70 70 } 71 71 ); … … 88 88 } 89 89 90 void PingLoad::loadRequest( ResourceRequest&& request)90 void PingLoad::loadRequest(NetworkProcess& networkProcess, ResourceRequest&& request) 91 91 { 92 92 RELEASE_LOG_IF_ALLOWED("startNetworkLoad"); 93 if (auto* networkSession = SessionTracker::networkSession(m_parameters.sessionID)) {93 if (auto* networkSession = networkProcess.networkSession(m_parameters.sessionID)) { 94 94 auto loadParameters = m_parameters; 95 95 loadParameters.request = WTFMove(request); -
trunk/Source/WebKit/NetworkProcess/PingLoad.h
r239741 r239815 58 58 void timeoutTimerFired(); 59 59 60 void loadRequest( WebCore::ResourceRequest&&);60 void loadRequest(NetworkProcess&, WebCore::ResourceRequest&&); 61 61 62 62 void didFinish(const WebCore::ResourceError& = { }, const WebCore::ResourceResponse& response = { }); -
trunk/Source/WebKit/NetworkProcess/PreconnectTask.cpp
r239007 r239815 33 33 #include "NetworkLoadParameters.h" 34 34 #include "NetworkProcess.h" 35 #include "SessionTracker.h"36 35 #include "WebErrors.h" 37 36 #include <WebCore/ResourceError.h> … … 41 40 using namespace WebCore; 42 41 43 PreconnectTask::PreconnectTask(Network LoadParameters&& parameters, CompletionHandler<void(const ResourceError&)>&& completionHandler)42 PreconnectTask::PreconnectTask(NetworkProcess& networkProcess, NetworkLoadParameters&& parameters, CompletionHandler<void(const ResourceError&)>&& completionHandler) 44 43 : m_completionHandler(WTFMove(completionHandler)) 45 44 , m_timeoutTimer([this] { didFinish(ResourceError { String(), 0, m_networkLoad->parameters().request.url(), "Preconnection timed out"_s, ResourceError::Type::Timeout }); }) … … 47 46 RELEASE_LOG(Network, "%p - PreconnectTask::PreconnectTask()", this); 48 47 49 auto* networkSession = SessionTracker::networkSession(parameters.sessionID);48 auto* networkSession = networkProcess.networkSession(parameters.sessionID); 50 49 if (!networkSession) { 51 50 ASSERT_NOT_REACHED(); -
trunk/Source/WebKit/NetworkProcess/PreconnectTask.h
r239007 r239815 37 37 class NetworkLoad; 38 38 class NetworkLoadParameters; 39 class NetworkProcess; 39 40 40 41 class PreconnectTask final : public NetworkLoadClient { 41 42 public: 42 explicit PreconnectTask(Network LoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&)>&& completionHandler = { });43 explicit PreconnectTask(NetworkProcess&, NetworkLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&)>&& completionHandler = { }); 43 44 ~PreconnectTask(); 44 45 -
trunk/Source/WebKit/NetworkProcess/RemoteNetworkingContext.h
r239680 r239815 36 36 class RemoteNetworkingContext { 37 37 public: 38 // FIXME: Remove platform-specific code and use SessionTracker.38 // FIXME: Remove platform-specific code. 39 39 static void ensureWebsiteDataStoreSession(NetworkProcess&, WebsiteDataStoreParameters&&); 40 40 }; -
trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp
r239759 r239815 32 32 #include "NetworkCache.h" 33 33 #include "NetworkLoad.h" 34 #include "NetworkProcess.h" 34 35 #include "NetworkSession.h" 35 #include "SessionTracker.h"36 36 #include <WebCore/NetworkStorageSession.h> 37 37 #include <pal/SessionID.h> … … 61 61 parameters.contentEncodingSniffingPolicy = ContentEncodingSniffingPolicy::Sniff; 62 62 parameters.request = m_originalRequest; 63 m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters), * SessionTracker::networkSession(PAL::SessionID::defaultSessionID()));63 m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters), *cache.networkProcess().networkSession(PAL::SessionID::defaultSessionID())); 64 64 } 65 65 -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
r239749 r239815 35 35 #import "NetworkProximityManager.h" 36 36 #import "NetworkSessionCocoa.h" 37 #import "SessionTracker.h"38 37 #import "WebCoreArgumentCoders.h" 39 38 #import <WebCore/AuthenticationChallenge.h> -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
r239792 r239815 35 35 #import "NetworkSessionCocoa.h" 36 36 #import "SandboxExtension.h" 37 #import "SessionTracker.h"38 37 #import <WebCore/NetworkStorageSession.h> 39 38 #import <WebCore/PublicSuffix.h> -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r239698 r239815 36 36 #import "NetworkProcess.h" 37 37 #import "NetworkSessionCreationParameters.h" 38 #import "SessionTracker.h"39 38 #import <Foundation/NSURLSession.h> 40 39 #import <WebCore/Credential.h> -
trunk/Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp
r239680 r239815 27 27 #include "RemoteNetworkingContext.h" 28 28 29 #include "NetworkProcess.h" 29 30 #include "NetworkSession.h" 30 #include "SessionTracker.h"31 31 #include "WebsiteDataStoreParameters.h" 32 32 #include <WebCore/NetworkStorageSession.h> … … 43 43 44 44 NetworkStorageSession::ensureSession(sessionID, String::number(sessionID.sessionID())); 45 SessionTracker::setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters)));45 networkProcess.setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters))); 46 46 } 47 47 -
trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm
r239683 r239815 32 32 #import "NetworkSession.h" 33 33 #import "NetworkSessionCreationParameters.h" 34 #import "SessionTracker.h"35 34 #import "WebErrors.h" 36 35 #import "WebsiteDataStoreParameters.h" … … 66 65 session->setCookie(cookie); 67 66 68 SessionTracker::setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters)));67 networkProcess.setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters))); 69 68 } 70 69 -
trunk/Source/WebKit/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
r239680 r239815 30 30 31 31 #include "NetworkSession.h" 32 #include "SessionTracker.h"33 32 #include "WebsiteDataStoreParameters.h" 34 33 #include <WebCore/NetworkStorageSession.h> … … 44 43 45 44 NetworkStorageSession::ensureSession(sessionID, String::number(sessionID.sessionID())); 46 SessionTracker::setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters)));45 networkProcess.setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters))); 47 46 } 48 47 -
trunk/Source/WebKit/Sources.txt
r239752 r239815 117 117 Shared/RTCPacketOptions.cpp 118 118 Shared/SessionState.cpp 119 Shared/SessionTracker.cpp120 119 Shared/ShareableBitmap.cpp @no-unify 121 120 Shared/ShareableResource.cpp -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r239792 r239815 1089 1089 6EE849C81368D9390038D481 /* WKInspectorPrivateMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE849C61368D92D0038D481 /* WKInspectorPrivateMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1090 1090 728E86F11795188C0087879E /* WebColorPickerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 728E86EF1795188C0087879E /* WebColorPickerMac.h */; }; 1091 753E3E0E1887398900188496 /* SessionTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 753E3E091887394B00188496 /* SessionTracker.h */; };1092 1091 75A8D2C8187CCFAB00C39C9E /* WKWebsiteDataStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2C4187CCF9F00C39C9E /* WKWebsiteDataStore.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1093 1092 75A8D2D6187D1C0E00C39C9E /* WKWebsiteDataStoreInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2D4187D1C0100C39C9E /* WKWebsiteDataStoreInternal.h */; }; … … 3516 3515 728E86EF1795188C0087879E /* WebColorPickerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPickerMac.h; sourceTree = "<group>"; }; 3517 3516 728E86F01795188C0087879E /* WebColorPickerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebColorPickerMac.mm; sourceTree = "<group>"; }; 3518 753E3E091887394B00188496 /* SessionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionTracker.h; sourceTree = "<group>"; };3519 753E3E0B1887397300188496 /* SessionTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionTracker.cpp; sourceTree = "<group>"; };3520 3517 75A8D2C4187CCF9F00C39C9E /* WKWebsiteDataStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebsiteDataStore.h; sourceTree = "<group>"; }; 3521 3518 75A8D2C5187CCF9F00C39C9E /* WKWebsiteDataStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebsiteDataStore.mm; sourceTree = "<group>"; }; … … 5072 5069 1AFDE6571954A42B00C48FFA /* SessionState.cpp */, 5073 5070 1AFDE6581954A42B00C48FFA /* SessionState.h */, 5074 753E3E0B1887397300188496 /* SessionTracker.cpp */,5075 753E3E091887394B00188496 /* SessionTracker.h */,5076 5071 1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */, 5077 5072 1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */, … … 9299 9294 1AFDE65A1954A42B00C48FFA /* SessionState.h in Headers */, 9300 9295 1A002D49196B345D00B9AD44 /* SessionStateCoding.h in Headers */, 9301 753E3E0E1887398900188496 /* SessionTracker.h in Headers */,9302 9296 1A6420E512DCE2FF00CAAE2C /* ShareableBitmap.h in Headers */, 9303 9297 51217461164C20E30037A5C1 /* ShareableResource.h in Headers */, -
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
r239737 r239815 34 34 #include "NetworkSessionCreationParameters.h" 35 35 #include "NotificationPermissionRequestManager.h" 36 #include "SessionTracker.h"37 36 #include "UserData.h" 38 37 #include "WebConnectionToUIProcess.h" … … 356 355 { 357 356 ASSERT(!hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); 358 if (enabled) {357 if (enabled) 359 358 WebProcess::singleton().ensureLegacyPrivateBrowsingSessionInNetworkProcess(); 360 }else361 SessionTracker::destroySession(PAL::SessionID::legacyPrivateSessionID());359 else 360 WebProcess::singleton().destroyLegacyPrivateBrowsingSessionInNetworkProcess(); 362 361 363 362 const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages(); -
trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
r239634 r239815 33 33 #include "NetworkProcessConnection.h" 34 34 #include "NetworkResourceLoadParameters.h" 35 #include "SessionTracker.h"36 35 #include "SharedBufferDataReference.h" 37 36 #include "WebCompiledContentRuleList.h" -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r239737 r239815 35 35 #include "NetworkResourceLoadParameters.h" 36 36 #include "PluginInfoStore.h" 37 #include "SessionTracker.h"38 37 #include "WebCoreArgumentCoders.h" 39 38 #include "WebErrors.h" -
trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp
r239737 r239815 28 28 29 29 #include "NetworkSession.h" 30 #include "SessionTracker.h"31 30 #include "WebFrame.h" 32 31 #include "WebPage.h" -
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h
r239737 r239815 41 41 } 42 42 43 // FIXME: remove platform-specific code and use SessionTracker43 // FIXME: remove platform-specific code. 44 44 static void ensureWebsiteDataStoreSession(WebsiteDataStoreParameters&&); 45 45 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
r239737 r239815 28 28 29 29 #include "NetworkSession.h" 30 #include "SessionTracker.h"31 30 #include "WebPage.h" 32 31 #include "WebProcess.h" -
trunk/Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
r239737 r239815 30 30 #include "NetworkSession.h" 31 31 #include "NetworkSessionCreationParameters.h" 32 #include "SessionTracker.h"33 32 #include "WebFrame.h" 34 33 #include "WebPage.h" -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r239777 r239815 59 59 #include "SessionState.h" 60 60 #include "SessionStateConversion.h" 61 #include "SessionTracker.h"62 61 #include "ShareSheetCallbackID.h" 63 62 #include "ShareableBitmap.h" -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r239792 r239815 42 42 #include "NetworkSessionCreationParameters.h" 43 43 #include "PluginProcessConnectionManager.h" 44 #include "SessionTracker.h"45 44 #include "StatisticsData.h" 46 45 #include "UserData.h" … … 542 541 } 543 542 543 void WebProcess::destroyLegacyPrivateBrowsingSessionInNetworkProcess() 544 { 545 ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::DestroyLegacyPrivateBrowsingSession(), 0); 546 } 547 544 548 #if ENABLE(NETSCAPE_PLUGIN_API) 545 549 PluginProcessConnectionManager& WebProcess::pluginProcessConnectionManager() -
trunk/Source/WebKit/WebProcess/WebProcess.h
r239737 r239815 179 179 180 180 void ensureLegacyPrivateBrowsingSessionInNetworkProcess(); 181 void destroyLegacyPrivateBrowsingSessionInNetworkProcess(); 181 182 182 183 void pageDidEnterWindow(uint64_t pageID); -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r239792 r239815 34 34 #import "SandboxExtension.h" 35 35 #import "SandboxInitializationParameters.h" 36 #import "SessionTracker.h"37 36 #import "WKAPICast.h" 38 37 #import "WKBrowsingContextHandleInternal.h"
Note:
See TracChangeset
for help on using the changeset viewer.