Diff
Modified: trunk/Source/WebKit/ChangeLog (239814 => 239815)
--- trunk/Source/WebKit/ChangeLog 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/ChangeLog 2019-01-10 03:08:07 UTC (rev 239815)
@@ -1,5 +1,74 @@
2019-01-09 Alex Christensen <achristen...@webkit.org>
+ Replace SessionTracker with HashMap member of NetworkProcess
+ https://bugs.webkit.org/show_bug.cgi?id=193266
+
+ Reviewed by Joseph Pecoraro.
+
+ * NetworkProcess/Downloads/DownloadManager.cpp:
+ (WebKit::DownloadManager::startDownload):
+ * NetworkProcess/Downloads/DownloadManager.h:
+ * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
+ (WebKit::Download::resume):
+ * NetworkProcess/NetworkCORSPreflightChecker.cpp:
+ (WebKit::NetworkCORSPreflightChecker::startPreflight):
+ * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+ (WebKit::NetworkConnectionToWebProcess::preconnectTo):
+ (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
+ (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
+ (WebKit::NetworkConnectionToWebProcess::destroyLegacyPrivateBrowsingSession):
+ * NetworkProcess/NetworkConnectionToWebProcess.h:
+ * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::initializeNetworkProcess):
+ (WebKit::NetworkProcess::clearCachedCredentials):
+ (WebKit::NetworkProcess::networkSession):
+ (WebKit::NetworkProcess::setSession):
+ (WebKit::NetworkProcess::destroySession):
+ (WebKit::NetworkProcess::preconnectTo):
+ * NetworkProcess/NetworkProcess.h:
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::startNetworkLoad):
+ (WebKit::NetworkResourceLoader::didFinishLoading):
+ (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
+ (WebKit::NetworkResourceLoader::shouldLogCookieInformation):
+ (WebKit::NetworkResourceLoader::logCookieInformation const):
+ (WebKit::logBlockedCookieInformation):
+ (WebKit::logCookieInformationInternal):
+ (WebKit::NetworkResourceLoader::logCookieInformation):
+ * NetworkProcess/NetworkResourceLoader.h:
+ * NetworkProcess/PingLoad.cpp:
+ (WebKit::PingLoad::loadRequest):
+ * NetworkProcess/PingLoad.h:
+ * NetworkProcess/PreconnectTask.cpp:
+ (WebKit::PreconnectTask::PreconnectTask):
+ * NetworkProcess/PreconnectTask.h:
+ * NetworkProcess/RemoteNetworkingContext.h:
+ * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
+ (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
+ * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+ * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ * NetworkProcess/mac/RemoteNetworkingContext.mm:
+ (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
+ * Shared/SessionTracker.cpp: Removed.
+ * Shared/SessionTracker.h: Removed.
+ * Sources.txt:
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
+ * WebProcess/Network/WebLoaderStrategy.cpp:
+ * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+ * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
+ * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
+ * WebProcess/WebPage/WebPage.cpp:
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::destroyLegacyPrivateBrowsingSessionInNetworkProcess):
+ * WebProcess/WebProcess.h:
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+
+2019-01-09 Alex Christensen <achristen...@webkit.org>
+
Expand use of sourceApplicationAuditData
https://bugs.webkit.org/show_bug.cgi?id=192995
<rdar://problem/46627875>
Modified: trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -31,7 +31,6 @@
#include "NetworkLoad.h"
#include "NetworkSession.h"
#include "PendingDownload.h"
-#include "SessionTracker.h"
#include <WebCore/NotImplemented.h>
#include <pal/SessionID.h>
#include <wtf/StdLibExtras.h>
@@ -46,7 +45,7 @@
void DownloadManager::startDownload(NetworkConnectionToWebProcess* connection, PAL::SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
{
- auto* networkSession = SessionTracker::networkSession(sessionID);
+ auto* networkSession = client().networkSession(sessionID);
if (!networkSession)
return;
Modified: trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -72,6 +72,7 @@
virtual IPC::Connection* parentProcessConnectionForDownloads() = 0;
virtual AuthenticationManager& downloadsAuthenticationManager() = 0;
virtual void pendingDownloadCanceled(DownloadID) = 0;
+ virtual NetworkSession* networkSession(const PAL::SessionID&) const = 0;
virtual void ref() const = 0;
virtual void deref() const = 0;
};
Modified: trunk/Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm 2019-01-10 03:08:07 UTC (rev 239815)
@@ -28,7 +28,6 @@
#import "DataReference.h"
#import "NetworkSessionCocoa.h"
-#import "SessionTracker.h"
#import "WKDownloadProgress.h"
#import <pal/spi/cf/CFNetworkSPI.h>
#import <pal/spi/cocoa/NSProgressSPI.h>
@@ -41,7 +40,7 @@
if (m_sandboxExtension)
m_sandboxExtension->consume();
- auto* networkSession = SessionTracker::networkSession(m_sessionID);
+ auto* networkSession = m_downloadManager.client().networkSession(m_sessionID);
if (!networkSession) {
WTFLogAlways("Could not find network session with given session ID");
return;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -31,7 +31,6 @@
#include "Logging.h"
#include "NetworkLoadParameters.h"
#include "NetworkProcess.h"
-#include "SessionTracker.h"
#include <WebCore/CrossOriginAccessControl.h>
#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(m_parameters.sessionID.isAlwaysOnLoggingAllowed(), Network, "%p - NetworkCORSPreflightChecker::" fmt, this, ##__VA_ARGS__)
@@ -72,7 +71,7 @@
if (m_shouldCaptureExtraNetworkLoadMetrics)
m_loadInformation = NetworkTransactionInformation { NetworkTransactionInformation::Type::Preflight, loadParameters.request, { }, { } };
- if (auto* networkSession = SessionTracker::networkSession(loadParameters.sessionID)) {
+ if (auto* networkSession = m_networkProcess->networkSession(loadParameters.sessionID)) {
m_task = NetworkDataTask::create(*networkSession, *this, WTFMove(loadParameters));
m_task->resume();
} else
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -45,7 +45,6 @@
#include "NetworkSocketStreamMessages.h"
#include "PingLoad.h"
#include "PreconnectTask.h"
-#include "SessionTracker.h"
#include "WebCoreArgumentCoders.h"
#include "WebErrors.h"
#include "WebIDBConnectionToClient.h"
@@ -391,7 +390,7 @@
void NetworkConnectionToWebProcess::preconnectTo(uint64_t preconnectionIdentifier, NetworkResourceLoadParameters&& parameters)
{
#if ENABLE(SERVER_PRECONNECT)
- new PreconnectTask(WTFMove(parameters), [this, protectedThis = makeRef(*this), identifier = preconnectionIdentifier] (const ResourceError& error) {
+ new PreconnectTask(networkProcess(), WTFMove(parameters), [this, protectedThis = makeRef(*this), identifier = preconnectionIdentifier] (const ResourceError& error) {
didFinishPreconnection(identifier, error);
});
#else
@@ -451,9 +450,9 @@
auto& networkStorageSession = storageSession(sessionID);
std::tie(cookieString, secureCookiesAccessed) = networkStorageSession.cookiesForDOM(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies);
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- if (auto session = SessionTracker::networkSession(sessionID)) {
+ if (auto session = networkProcess().networkSession(sessionID)) {
if (session->shouldLogCookieInformation())
- NetworkResourceLoader::logCookieInformation("NetworkConnectionToWebProcess::cookiesForDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt);
+ NetworkResourceLoader::logCookieInformation(*this, "NetworkConnectionToWebProcess::cookiesForDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt);
}
#endif
}
@@ -463,9 +462,9 @@
auto& networkStorageSession = storageSession(sessionID);
networkStorageSession.setCookiesFromDOM(firstParty, sameSiteInfo, url, frameID, pageID, cookieString);
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- if (auto session = SessionTracker::networkSession(sessionID)) {
+ if (auto session = networkProcess().networkSession(sessionID)) {
if (session->shouldLogCookieInformation())
- NetworkResourceLoader::logCookieInformation("NetworkConnectionToWebProcess::setCookiesFromDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt);
+ NetworkResourceLoader::logCookieInformation(*this, "NetworkConnectionToWebProcess::setCookiesFromDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt);
}
#endif
}
@@ -555,6 +554,11 @@
m_networkProcess->addWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters());
}
+void NetworkConnectionToWebProcess::destroyLegacyPrivateBrowsingSession()
+{
+ m_networkProcess->destroySession(PAL::SessionID::legacyPrivateSessionID());
+}
+
void NetworkConnectionToWebProcess::removeStorageAccessForFrame(PAL::SessionID sessionID, uint64_t frameID, uint64_t pageID)
{
#if ENABLE(RESOURCE_LOAD_STATISTICS)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -171,6 +171,7 @@
void destroySocketStream(uint64_t);
void ensureLegacyPrivateBrowsingSession();
+ void destroyLegacyPrivateBrowsingSession();
#if ENABLE(INDEXED_DATABASE)
// Messages handlers (Modern IDB).
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in 2019-01-10 03:08:07 UTC (rev 239815)
@@ -55,6 +55,7 @@
CreateSocketStream(URL url, PAL::SessionID sessionID, String cachePartition, uint64_t identifier)
EnsureLegacyPrivateBrowsingSession()
+ DestroyLegacyPrivateBrowsingSession()
RemoveStorageAccessForFrame(PAL::SessionID sessionID, uint64_t frameID, uint64_t pageID);
RemoveStorageAccessForAllFramesOnPage(PAL::SessionID sessionID, uint64_t pageID);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -49,7 +49,6 @@
#include "NetworkSessionCreationParameters.h"
#include "PreconnectTask.h"
#include "RemoteNetworkingContext.h"
-#include "SessionTracker.h"
#include "StatisticsData.h"
#include "WebCookieManager.h"
#include "WebPageProxyMessages.h"
@@ -302,7 +301,7 @@
NetworkStorageSession::switchToNewTestingSession();
auto sessionID = parameters.defaultDataStoreParameters.networkSessionParameters.sessionID;
- SessionTracker::setSession(sessionID, NetworkSession::create(*this, WTFMove(parameters.defaultDataStoreParameters.networkSessionParameters)));
+ setSession(sessionID, NetworkSession::create(*this, WTFMove(parameters.defaultDataStoreParameters.networkSessionParameters)));
#if ENABLE(INDEXED_DATABASE)
addIndexedDatabaseSession(sessionID, parameters.defaultDataStoreParameters.indexedDatabaseDirectory, parameters.defaultDataStoreParameters.indexedDatabaseDirectoryExtensionHandle);
@@ -319,7 +318,7 @@
}
#endif
- auto* defaultSession = SessionTracker::networkSession(PAL::SessionID::defaultSessionID());
+ auto* defaultSession = networkSession(PAL::SessionID::defaultSessionID());
for (const auto& cookie : parameters.defaultDataStoreParameters.pendingCookies)
defaultSession->networkStorageSession().setCookie(cookie);
@@ -432,7 +431,7 @@
void NetworkProcess::clearCachedCredentials()
{
NetworkStorageSession::defaultStorageSession().credentialStorage().clearCredentials();
- if (auto* networkSession = SessionTracker::networkSession(PAL::SessionID::defaultSessionID()))
+ if (auto* networkSession = this->networkSession(PAL::SessionID::defaultSessionID()))
networkSession->clearCredentials();
else
ASSERT_NOT_REACHED();
@@ -452,9 +451,21 @@
RemoteNetworkingContext::ensureWebsiteDataStoreSession(*this, WTFMove(parameters));
}
-void NetworkProcess::destroySession(PAL::SessionID sessionID)
+NetworkSession* NetworkProcess::networkSession(const PAL::SessionID& sessionID) const
{
- SessionTracker::destroySession(sessionID);
+ return m_networkSessions.get(sessionID);
+}
+
+void NetworkProcess::setSession(const PAL::SessionID& sessionID, Ref<NetworkSession>&& session)
+{
+ m_networkSessions.set(sessionID, WTFMove(session));
+}
+
+void NetworkProcess::destroySession(const PAL::SessionID& sessionID)
+{
+ if (auto session = m_networkSessions.take(sessionID))
+ session->get().invalidateAndCancel();
+ NetworkStorageSession::destroySession(sessionID);
m_sessionsControlledByAutomation.remove(sessionID);
CacheStorage::Engine::destroyEngine(*this, sessionID);
@@ -1033,7 +1044,7 @@
parameters.storedCredentialsPolicy = storedCredentialsPolicy;
parameters.shouldPreconnectOnly = PreconnectOnly::Yes;
- new PreconnectTask(WTFMove(parameters));
+ new PreconnectTask(*this, WTFMove(parameters));
#else
UNUSED_PARAM(url);
UNUSED_PARAM(storedCredentialsPolicy);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.h (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -125,6 +125,10 @@
NetworkCache::Cache* cache() { return m_cache.get(); }
+ void setSession(const PAL::SessionID&, Ref<NetworkSession>&&);
+ NetworkSession* networkSession(const PAL::SessionID&) const override;
+ void destroySession(const PAL::SessionID&);
+
bool canHandleHTTPSServerTrustEvaluation() const { return m_canHandleHTTPSServerTrustEvaluation; }
void processWillSuspendImminently(bool& handled);
@@ -265,7 +269,6 @@
void didReceiveSyncNetworkProcessMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&);
void initializeNetworkProcess(NetworkProcessCreationParameters&&);
void createNetworkConnectionToWebProcess(bool isServiceWorkerProcess, WebCore::SecurityOriginData&&);
- void destroySession(PAL::SessionID);
void fetchWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, OptionSet<WebsiteDataFetchOption>, uint64_t callbackID);
void deleteWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, WallTime modifiedSince, uint64_t callbackID);
@@ -375,8 +378,8 @@
NetworkProcessSupplementMap m_supplements;
HashSet<PAL::SessionID> m_sessionsControlledByAutomation;
-
HashMap<PAL::SessionID, Vector<CacheStorageParametersCallback>> m_cacheStorageParametersCallbacks;
+ HashMap<PAL::SessionID, Ref<NetworkSession>> m_networkSessions;
#if PLATFORM(COCOA)
void platformInitializeNetworkProcessCocoa(const NetworkProcessCreationParameters&);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -36,7 +36,6 @@
#include "NetworkLoadChecker.h"
#include "NetworkProcess.h"
#include "NetworkProcessConnectionMessages.h"
-#include "SessionTracker.h"
#include "SharedBufferDataReference.h"
#include "WebCoreArgumentCoders.h"
#include "WebErrors.h"
@@ -284,10 +283,10 @@
if (request.url().protocolIsBlob())
parameters.blobFileReferences = NetworkBlobRegistry::singleton().filesInBlob(m_connection, originalRequest().url());
- auto* networkSession = SessionTracker::networkSession(parameters.sessionID);
+ auto* networkSession = m_connection->networkProcess().networkSession(parameters.sessionID);
if (!networkSession && parameters.sessionID.isEphemeral()) {
m_connection->networkProcess().addWebsiteDataStore(WebsiteDataStoreParameters::privateSessionParameters(parameters.sessionID));
- networkSession = SessionTracker::networkSession(parameters.sessionID);
+ networkSession = m_connection->networkProcess().networkSession(parameters.sessionID);
}
if (!networkSession) {
WTFLogAlways("Attempted to create a NetworkLoad with a session (id=%" PRIu64 ") that does not exist.", parameters.sessionID.sessionID());
@@ -550,7 +549,7 @@
}
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- if (shouldLogCookieInformation(sessionID()))
+ if (shouldLogCookieInformation(m_connection, sessionID()))
logCookieInformation();
#endif
@@ -850,7 +849,7 @@
#endif
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- if (shouldLogCookieInformation(sessionID()))
+ if (shouldLogCookieInformation(m_connection, sessionID()))
logCookieInformation();
#endif
@@ -949,9 +948,9 @@
}
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
-bool NetworkResourceLoader::shouldLogCookieInformation(const PAL::SessionID& sessionID)
+bool NetworkResourceLoader::shouldLogCookieInformation(NetworkConnectionToWebProcess& connection, const PAL::SessionID& sessionID)
{
- if (auto session = SessionTracker::networkSession(sessionID))
+ if (auto session = connection.networkProcess().networkSession(sessionID))
return session->shouldLogCookieInformation();
return false;
}
@@ -968,17 +967,17 @@
void NetworkResourceLoader::logCookieInformation() const
{
- ASSERT(shouldLogCookieInformation(sessionID()));
+ ASSERT(shouldLogCookieInformation(m_connection, sessionID()));
auto networkStorageSession = WebCore::NetworkStorageSession::storageSession(sessionID());
ASSERT(networkStorageSession);
- logCookieInformation("NetworkResourceLoader", reinterpret_cast<const void*>(this), *networkStorageSession, originalRequest().firstPartyForCookies(), SameSiteInfo::create(originalRequest()), originalRequest().url(), originalRequest().httpReferrer(), frameID(), pageID(), identifier());
+ logCookieInformation(m_connection, "NetworkResourceLoader", reinterpret_cast<const void*>(this), *networkStorageSession, originalRequest().firstPartyForCookies(), SameSiteInfo::create(originalRequest()), originalRequest().url(), originalRequest().httpReferrer(), frameID(), pageID(), identifier());
}
-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)
+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)
{
- ASSERT(NetworkResourceLoader::shouldLogCookieInformation(networkStorageSession.sessionID()));
+ ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID()));
auto escapedURL = escapeForJSON(url.string());
auto escapedFirstParty = escapeForJSON(firstParty.string());
@@ -1003,9 +1002,9 @@
#undef LOCAL_LOG_IF_ALLOWED
}
-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)
+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)
{
- ASSERT(NetworkResourceLoader::shouldLogCookieInformation(networkStorageSession.sessionID()));
+ ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID()));
Vector<WebCore::Cookie> cookies;
if (!networkStorageSession.getRawCookies(firstParty, sameSiteInfo, url, frameID, pageID, cookies))
@@ -1064,14 +1063,14 @@
#undef LOCAL_LOG_IF_ALLOWED
}
-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)
+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)
{
- ASSERT(shouldLogCookieInformation(networkStorageSession.sessionID()));
+ ASSERT(shouldLogCookieInformation(connection, networkStorageSession.sessionID()));
if (networkStorageSession.shouldBlockCookies(firstParty, url, frameID, pageID))
- logBlockedCookieInformation(label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier);
+ logBlockedCookieInformation(connection, label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier);
else
- logCookieInformationInternal(label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier);
+ logCookieInformationInternal(connection, label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier);
}
#endif
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -109,8 +109,8 @@
bool isAlwaysOnLoggingAllowed() const;
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- static bool shouldLogCookieInformation(const PAL::SessionID&);
- 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);
+ static bool shouldLogCookieInformation(NetworkConnectionToWebProcess&, const PAL::SessionID&);
+ 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);
#endif
private:
Modified: trunk/Source/WebKit/NetworkProcess/PingLoad.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/PingLoad.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/PingLoad.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -30,7 +30,7 @@
#include "AuthenticationManager.h"
#include "Logging.h"
#include "NetworkLoadChecker.h"
-#include "SessionTracker.h"
+#include "NetworkProcess.h"
#include "WebErrors.h"
#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(m_parameters.sessionID.isAlwaysOnLoggingAllowed(), Network, "%p - PingLoad::" fmt, this, ##__VA_ARGS__)
@@ -56,7 +56,7 @@
// Set a very generous timeout, just in case.
m_timeoutTimer.startOneShot(60000_s);
- m_networkLoadChecker->check(ResourceRequest { m_parameters.request }, nullptr, [this] (auto&& result) {
+ m_networkLoadChecker->check(ResourceRequest { m_parameters.request }, nullptr, [this, networkProcess = makeRef(networkProcess)] (auto&& result) {
WTF::switchOn(result,
[this] (ResourceError& error) {
this->didFinish(error);
@@ -65,8 +65,8 @@
// We should never send a synthetic redirect for PingLoads.
ASSERT_NOT_REACHED();
},
- [this] (ResourceRequest& request) {
- this->loadRequest(WTFMove(request));
+ [&] (ResourceRequest& request) {
+ this->loadRequest(networkProcess, WTFMove(request));
}
);
});
@@ -87,10 +87,10 @@
delete this;
}
-void PingLoad::loadRequest(ResourceRequest&& request)
+void PingLoad::loadRequest(NetworkProcess& networkProcess, ResourceRequest&& request)
{
RELEASE_LOG_IF_ALLOWED("startNetworkLoad");
- if (auto* networkSession = SessionTracker::networkSession(m_parameters.sessionID)) {
+ if (auto* networkSession = networkProcess.networkSession(m_parameters.sessionID)) {
auto loadParameters = m_parameters;
loadParameters.request = WTFMove(request);
m_task = NetworkDataTask::create(*networkSession, *this, WTFMove(loadParameters));
Modified: trunk/Source/WebKit/NetworkProcess/PingLoad.h (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/PingLoad.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/PingLoad.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -57,7 +57,7 @@
void cannotShowURL() final;
void timeoutTimerFired();
- void loadRequest(WebCore::ResourceRequest&&);
+ void loadRequest(NetworkProcess&, WebCore::ResourceRequest&&);
void didFinish(const WebCore::ResourceError& = { }, const WebCore::ResourceResponse& response = { });
Modified: trunk/Source/WebKit/NetworkProcess/PreconnectTask.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/PreconnectTask.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/PreconnectTask.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -32,7 +32,6 @@
#include "NetworkLoad.h"
#include "NetworkLoadParameters.h"
#include "NetworkProcess.h"
-#include "SessionTracker.h"
#include "WebErrors.h"
#include <WebCore/ResourceError.h>
@@ -40,13 +39,13 @@
using namespace WebCore;
-PreconnectTask::PreconnectTask(NetworkLoadParameters&& parameters, CompletionHandler<void(const ResourceError&)>&& completionHandler)
+PreconnectTask::PreconnectTask(NetworkProcess& networkProcess, NetworkLoadParameters&& parameters, CompletionHandler<void(const ResourceError&)>&& completionHandler)
: m_completionHandler(WTFMove(completionHandler))
, m_timeoutTimer([this] { didFinish(ResourceError { String(), 0, m_networkLoad->parameters().request.url(), "Preconnection timed out"_s, ResourceError::Type::Timeout }); })
{
RELEASE_LOG(Network, "%p - PreconnectTask::PreconnectTask()", this);
- auto* networkSession = SessionTracker::networkSession(parameters.sessionID);
+ auto* networkSession = networkProcess.networkSession(parameters.sessionID);
if (!networkSession) {
ASSERT_NOT_REACHED();
m_completionHandler(internalError(parameters.request.url()));
Modified: trunk/Source/WebKit/NetworkProcess/PreconnectTask.h (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/PreconnectTask.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/PreconnectTask.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -36,10 +36,11 @@
class NetworkLoad;
class NetworkLoadParameters;
+class NetworkProcess;
class PreconnectTask final : public NetworkLoadClient {
public:
- explicit PreconnectTask(NetworkLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&)>&& completionHandler = { });
+ explicit PreconnectTask(NetworkProcess&, NetworkLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&)>&& completionHandler = { });
~PreconnectTask();
private:
Modified: trunk/Source/WebKit/NetworkProcess/RemoteNetworkingContext.h (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/RemoteNetworkingContext.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/RemoteNetworkingContext.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -35,7 +35,7 @@
class RemoteNetworkingContext {
public:
- // FIXME: Remove platform-specific code and use SessionTracker.
+ // FIXME: Remove platform-specific code.
static void ensureWebsiteDataStoreSession(NetworkProcess&, WebsiteDataStoreParameters&&);
};
Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -31,8 +31,8 @@
#include "Logging.h"
#include "NetworkCache.h"
#include "NetworkLoad.h"
+#include "NetworkProcess.h"
#include "NetworkSession.h"
-#include "SessionTracker.h"
#include <WebCore/NetworkStorageSession.h>
#include <pal/SessionID.h>
#include <wtf/RunLoop.h>
@@ -60,7 +60,7 @@
parameters.contentSniffingPolicy = ContentSniffingPolicy::DoNotSniffContent;
parameters.contentEncodingSniffingPolicy = ContentEncodingSniffingPolicy::Sniff;
parameters.request = m_originalRequest;
- m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters), *SessionTracker::networkSession(PAL::SessionID::defaultSessionID()));
+ m_networkLoad = std::make_unique<NetworkLoad>(*this, WTFMove(parameters), *cache.networkProcess().networkSession(PAL::SessionID::defaultSessionID()));
}
SpeculativeLoad::~SpeculativeLoad()
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2019-01-10 03:08:07 UTC (rev 239815)
@@ -34,7 +34,6 @@
#import "NetworkProcess.h"
#import "NetworkProximityManager.h"
#import "NetworkSessionCocoa.h"
-#import "SessionTracker.h"
#import "WebCoreArgumentCoders.h"
#import <WebCore/AuthenticationChallenge.h>
#import <WebCore/FileSystem.h>
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm 2019-01-10 03:08:07 UTC (rev 239815)
@@ -34,7 +34,6 @@
#import "NetworkResourceLoader.h"
#import "NetworkSessionCocoa.h"
#import "SandboxExtension.h"
-#import "SessionTracker.h"
#import <WebCore/NetworkStorageSession.h>
#import <WebCore/PublicSuffix.h>
#import <WebCore/ResourceRequestCFNet.h>
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2019-01-10 03:08:07 UTC (rev 239815)
@@ -35,7 +35,6 @@
#import "NetworkLoad.h"
#import "NetworkProcess.h"
#import "NetworkSessionCreationParameters.h"
-#import "SessionTracker.h"
#import <Foundation/NSURLSession.h>
#import <WebCore/Credential.h>
#import <WebCore/FormDataStreamMac.h>
Modified: trunk/Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -26,8 +26,8 @@
#include "config.h"
#include "RemoteNetworkingContext.h"
+#include "NetworkProcess.h"
#include "NetworkSession.h"
-#include "SessionTracker.h"
#include "WebsiteDataStoreParameters.h"
#include <WebCore/NetworkStorageSession.h>
@@ -42,7 +42,7 @@
return;
NetworkStorageSession::ensureSession(sessionID, String::number(sessionID.sessionID()));
- SessionTracker::setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters)));
+ networkProcess.setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters)));
}
}
Modified: trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm 2019-01-10 03:08:07 UTC (rev 239815)
@@ -31,7 +31,6 @@
#import "NetworkProcess.h"
#import "NetworkSession.h"
#import "NetworkSessionCreationParameters.h"
-#import "SessionTracker.h"
#import "WebErrors.h"
#import "WebsiteDataStoreParameters.h"
#import <WebCore/NetworkStorageSession.h>
@@ -65,7 +64,7 @@
for (const auto& cookie : parameters.pendingCookies)
session->setCookie(cookie);
- SessionTracker::setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters)));
+ networkProcess.setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters)));
}
}
Modified: trunk/Source/WebKit/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp (239814 => 239815)
--- trunk/Source/WebKit/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -29,7 +29,6 @@
#include "RemoteNetworkingContext.h"
#include "NetworkSession.h"
-#include "SessionTracker.h"
#include "WebsiteDataStoreParameters.h"
#include <WebCore/NetworkStorageSession.h>
@@ -43,7 +42,7 @@
return;
NetworkStorageSession::ensureSession(sessionID, String::number(sessionID.sessionID()));
- SessionTracker::setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters)));
+ networkProcess.setSession(sessionID, NetworkSession::create(networkProcess, WTFMove(parameters.networkSessionParameters)));
}
}
Deleted: trunk/Source/WebKit/Shared/SessionTracker.cpp (239814 => 239815)
--- trunk/Source/WebKit/Shared/SessionTracker.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/Shared/SessionTracker.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "SessionTracker.h"
-
-#include "NetworkSession.h"
-#include <WebCore/NetworkStorageSession.h>
-#include <wtf/NeverDestroyed.h>
-#include <wtf/RunLoop.h>
-
-namespace WebKit {
-using namespace WebCore;
-
-static HashMap<PAL::SessionID, RefPtr<NetworkSession>>& staticSessionMap()
-{
- ASSERT(RunLoop::isMain());
-
- static NeverDestroyed<HashMap<PAL::SessionID, RefPtr<NetworkSession>>> map;
- return map;
-}
-
-NetworkSession* SessionTracker::networkSession(PAL::SessionID sessionID)
-{
- return staticSessionMap().get(sessionID);
-}
-
-void SessionTracker::setSession(PAL::SessionID sessionID, Ref<NetworkSession>&& session)
-{
- staticSessionMap().set(sessionID, WTFMove(session));
-}
-
-void SessionTracker::destroySession(PAL::SessionID sessionID)
-{
- ASSERT(RunLoop::isMain());
- auto session = staticSessionMap().take(sessionID);
- if (session)
- session->invalidateAndCancel();
- NetworkStorageSession::destroySession(sessionID);
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit/Shared/SessionTracker.h (239814 => 239815)
--- trunk/Source/WebKit/Shared/SessionTracker.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/Shared/SessionTracker.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SessionTracker_h
-#define SessionTracker_h
-
-namespace WebCore {
-class NetworkStorageSession;
-}
-
-#include <pal/SessionID.h>
-#include <wtf/HashMap.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-class NetworkSession;
-
-class SessionTracker {
- WTF_MAKE_NONCOPYABLE(SessionTracker);
-public:
- static void setSession(PAL::SessionID, Ref<NetworkSession>&&);
- static NetworkSession* networkSession(PAL::SessionID);
- static void destroySession(PAL::SessionID);
-};
-
-} // namespace WebKit
-
-#endif // SessionTracker_h
Modified: trunk/Source/WebKit/Sources.txt (239814 => 239815)
--- trunk/Source/WebKit/Sources.txt 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/Sources.txt 2019-01-10 03:08:07 UTC (rev 239815)
@@ -116,7 +116,6 @@
Shared/RTCNetwork.cpp
Shared/RTCPacketOptions.cpp
Shared/SessionState.cpp
-Shared/SessionTracker.cpp
Shared/ShareableBitmap.cpp @no-unify
Shared/ShareableResource.cpp
Shared/SharedStringHashStore.cpp
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (239814 => 239815)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2019-01-10 03:08:07 UTC (rev 239815)
@@ -1088,7 +1088,6 @@
6BE969CD1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BE969CC1E54E054008B7483 /* ResourceLoadStatisticsClassifier.h */; };
6EE849C81368D9390038D481 /* WKInspectorPrivateMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE849C61368D92D0038D481 /* WKInspectorPrivateMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
728E86F11795188C0087879E /* WebColorPickerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 728E86EF1795188C0087879E /* WebColorPickerMac.h */; };
- 753E3E0E1887398900188496 /* SessionTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 753E3E091887394B00188496 /* SessionTracker.h */; };
75A8D2C8187CCFAB00C39C9E /* WKWebsiteDataStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2C4187CCF9F00C39C9E /* WKWebsiteDataStore.h */; settings = {ATTRIBUTES = (Public, ); }; };
75A8D2D6187D1C0E00C39C9E /* WKWebsiteDataStoreInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2D4187D1C0100C39C9E /* WKWebsiteDataStoreInternal.h */; };
762B748D120BC75C00819339 /* WKPreferencesRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 762B7484120BBA2D00819339 /* WKPreferencesRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3515,8 +3514,6 @@
6EE849C61368D92D0038D481 /* WKInspectorPrivateMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKInspectorPrivateMac.h; path = mac/WKInspectorPrivateMac.h; sourceTree = "<group>"; };
728E86EF1795188C0087879E /* WebColorPickerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPickerMac.h; sourceTree = "<group>"; };
728E86F01795188C0087879E /* WebColorPickerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebColorPickerMac.mm; sourceTree = "<group>"; };
- 753E3E091887394B00188496 /* SessionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionTracker.h; sourceTree = "<group>"; };
- 753E3E0B1887397300188496 /* SessionTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionTracker.cpp; sourceTree = "<group>"; };
75A8D2C4187CCF9F00C39C9E /* WKWebsiteDataStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebsiteDataStore.h; sourceTree = "<group>"; };
75A8D2C5187CCF9F00C39C9E /* WKWebsiteDataStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebsiteDataStore.mm; sourceTree = "<group>"; };
75A8D2D4187D1C0100C39C9E /* WKWebsiteDataStoreInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebsiteDataStoreInternal.h; sourceTree = "<group>"; };
@@ -5071,8 +5068,6 @@
E1E552C316AE065E004ED653 /* SandboxInitializationParameters.h */,
1AFDE6571954A42B00C48FFA /* SessionState.cpp */,
1AFDE6581954A42B00C48FFA /* SessionState.h */,
- 753E3E0B1887397300188496 /* SessionTracker.cpp */,
- 753E3E091887394B00188496 /* SessionTracker.h */,
1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */,
1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */,
5121745E164C20E30037A5C1 /* ShareableResource.cpp */,
@@ -9298,7 +9293,6 @@
414DEDD71F9EDDE50047C40D /* ServiceWorkerProcessProxy.h in Headers */,
1AFDE65A1954A42B00C48FFA /* SessionState.h in Headers */,
1A002D49196B345D00B9AD44 /* SessionStateCoding.h in Headers */,
- 753E3E0E1887398900188496 /* SessionTracker.h in Headers */,
1A6420E512DCE2FF00CAAE2C /* ShareableBitmap.h in Headers */,
51217461164C20E30037A5C1 /* ShareableResource.h in Headers */,
1A24BED5120894D100FBB059 /* SharedMemory.h in Headers */,
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -33,7 +33,6 @@
#include "NetworkProcessConnection.h"
#include "NetworkSessionCreationParameters.h"
#include "NotificationPermissionRequestManager.h"
-#include "SessionTracker.h"
#include "UserData.h"
#include "WebConnectionToUIProcess.h"
#include "WebCoreArgumentCoders.h"
@@ -355,10 +354,10 @@
void InjectedBundle::setPrivateBrowsingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
{
ASSERT(!hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));
- if (enabled) {
+ if (enabled)
WebProcess::singleton().ensureLegacyPrivateBrowsingSessionInNetworkProcess();
- } else
- SessionTracker::destroySession(PAL::SessionID::legacyPrivateSessionID());
+ else
+ WebProcess::singleton().destroyLegacyPrivateBrowsingSessionInNetworkProcess();
const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
Modified: trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -32,7 +32,6 @@
#include "NetworkConnectionToWebProcessMessages.h"
#include "NetworkProcessConnection.h"
#include "NetworkResourceLoadParameters.h"
-#include "SessionTracker.h"
#include "SharedBufferDataReference.h"
#include "WebCompiledContentRuleList.h"
#include "WebCoreArgumentCoders.h"
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -34,7 +34,6 @@
#include "NetworkProcessConnection.h"
#include "NetworkResourceLoadParameters.h"
#include "PluginInfoStore.h"
-#include "SessionTracker.h"
#include "WebCoreArgumentCoders.h"
#include "WebErrors.h"
#include "WebFrame.h"
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -27,7 +27,6 @@
#include "WebFrameNetworkingContext.h"
#include "NetworkSession.h"
-#include "SessionTracker.h"
#include "WebFrame.h"
#include "WebPage.h"
#include "WebsiteDataStoreParameters.h"
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -40,7 +40,7 @@
return adoptRef(*new WebFrameNetworkingContext(frame));
}
- // FIXME: remove platform-specific code and use SessionTracker
+ // FIXME: remove platform-specific code.
static void ensureWebsiteDataStoreSession(WebsiteDataStoreParameters&&);
WebFrameLoaderClient* webFrameLoaderClient() const;
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm 2019-01-10 03:08:07 UTC (rev 239815)
@@ -27,7 +27,6 @@
#include "WebFrameNetworkingContext.h"
#include "NetworkSession.h"
-#include "SessionTracker.h"
#include "WebPage.h"
#include "WebProcess.h"
#include "WebsiteDataStoreParameters.h"
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -29,7 +29,6 @@
#include "NetworkSession.h"
#include "NetworkSessionCreationParameters.h"
-#include "SessionTracker.h"
#include "WebFrame.h"
#include "WebPage.h"
#include "WebsiteDataStoreParameters.h"
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -58,7 +58,6 @@
#include "RemoteWebInspectorUIMessages.h"
#include "SessionState.h"
#include "SessionStateConversion.h"
-#include "SessionTracker.h"
#include "ShareSheetCallbackID.h"
#include "ShareableBitmap.h"
#include "SharedBufferDataReference.h"
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-01-10 03:08:07 UTC (rev 239815)
@@ -41,7 +41,6 @@
#include "NetworkSession.h"
#include "NetworkSessionCreationParameters.h"
#include "PluginProcessConnectionManager.h"
-#include "SessionTracker.h"
#include "StatisticsData.h"
#include "UserData.h"
#include "WebAutomationSessionProxy.h"
@@ -541,6 +540,11 @@
ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::EnsureLegacyPrivateBrowsingSession(), 0);
}
+void WebProcess::destroyLegacyPrivateBrowsingSessionInNetworkProcess()
+{
+ ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::DestroyLegacyPrivateBrowsingSession(), 0);
+}
+
#if ENABLE(NETSCAPE_PLUGIN_API)
PluginProcessConnectionManager& WebProcess::pluginProcessConnectionManager()
{
Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/WebProcess.h 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h 2019-01-10 03:08:07 UTC (rev 239815)
@@ -178,6 +178,7 @@
void setCacheModel(CacheModel);
void ensureLegacyPrivateBrowsingSessionInNetworkProcess();
+ void destroyLegacyPrivateBrowsingSessionInNetworkProcess();
void pageDidEnterWindow(uint64_t pageID);
void pageWillLeaveWindow(uint64_t pageID);
Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (239814 => 239815)
--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2019-01-10 02:27:45 UTC (rev 239814)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2019-01-10 03:08:07 UTC (rev 239815)
@@ -33,7 +33,6 @@
#import "ObjCObjectGraph.h"
#import "SandboxExtension.h"
#import "SandboxInitializationParameters.h"
-#import "SessionTracker.h"
#import "WKAPICast.h"
#import "WKBrowsingContextHandleInternal.h"
#import "WKCrashReporter.h"