Diff
Modified: trunk/Source/WebKit/ChangeLog (238629 => 238630)
--- trunk/Source/WebKit/ChangeLog 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/ChangeLog 2018-11-28 21:09:09 UTC (rev 238630)
@@ -1,3 +1,48 @@
+2018-11-28 Alex Christensen <[email protected]>
+
+ Move logCookieInformation bool from NetworkProcess to NetworkSession
+ https://bugs.webkit.org/show_bug.cgi?id=192049
+
+ Reviewed by Chris Dumez.
+
+ Part of an effort to remove globals in the NetworkProcess.
+
+ * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+ (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
+ (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::initializeNetworkProcess):
+ * NetworkProcess/NetworkProcess.h:
+ (WebKit::NetworkProcess::shouldLogCookieInformation const): Deleted.
+ * NetworkProcess/NetworkProcessCreationParameters.cpp:
+ (WebKit::NetworkProcessCreationParameters::encode const):
+ (WebKit::NetworkProcessCreationParameters::decode):
+ * NetworkProcess/NetworkProcessCreationParameters.h:
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::didFinishLoading):
+ (WebKit::NetworkResourceLoader::sendResultForCacheEntry):
+ (WebKit::NetworkResourceLoader::shouldLogCookieInformation):
+ (WebKit::NetworkResourceLoader::logCookieInformation const):
+ (WebKit::logBlockedCookieInformation):
+ (WebKit::logCookieInformationInternal):
+ (WebKit::NetworkResourceLoader::logCookieInformation):
+ * NetworkProcess/NetworkResourceLoader.h:
+ * NetworkProcess/NetworkSession.h:
+ (WebKit::NetworkSession::logCookieInformation const):
+ * NetworkProcess/NetworkSessionCreationParameters.h:
+ (WebKit::NetworkSessionCreationParameters::encode const):
+ (WebKit::NetworkSessionCreationParameters::decode):
+ * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+ (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
+ (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
+ * NetworkProcess/cocoa/NetworkSessionCocoa.h:
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::WebProcessPool::platformInitializeNetworkProcess):
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::parameters):
+
2018-11-28 Ryan Haddad <[email protected]>
Unreviewed, rolling out r238620.
Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2018-11-28 21:09:09 UTC (rev 238630)
@@ -43,6 +43,7 @@
#include "NetworkResourceLoadParameters.h"
#include "NetworkResourceLoader.h"
#include "NetworkResourceLoaderMessages.h"
+#include "NetworkSession.h"
#include "NetworkSocketStream.h"
#include "NetworkSocketStreamMessages.h"
#include "PingLoad.h"
@@ -455,8 +456,10 @@
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 (NetworkProcess::singleton().shouldLogCookieInformation())
- NetworkResourceLoader::logCookieInformation("NetworkConnectionToWebProcess::cookiesForDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, std::nullopt);
+ if (auto session = SessionTracker::networkSession(sessionID)) {
+ if (session->shouldLogCookieInformation())
+ NetworkResourceLoader::logCookieInformation("NetworkConnectionToWebProcess::cookiesForDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, std::nullopt);
+ }
#endif
}
@@ -465,8 +468,10 @@
auto& networkStorageSession = storageSession(sessionID);
networkStorageSession.setCookiesFromDOM(firstParty, sameSiteInfo, url, frameID, pageID, cookieString);
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- if (NetworkProcess::singleton().shouldLogCookieInformation())
- NetworkResourceLoader::logCookieInformation("NetworkConnectionToWebProcess::setCookiesFromDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, std::nullopt);
+ if (auto session = SessionTracker::networkSession(sessionID)) {
+ if (session->shouldLogCookieInformation())
+ NetworkResourceLoader::logCookieInformation("NetworkConnectionToWebProcess::setCookiesFromDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, std::nullopt);
+ }
#endif
}
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2018-11-28 21:09:09 UTC (rev 238630)
@@ -321,10 +321,6 @@
if (parameters.shouldUseTestingNetworkSession)
NetworkStorageSession::switchToNewTestingSession();
-#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- m_logCookieInformation = parameters.logCookieInformation;
-#endif
-
SessionTracker::setSession(PAL::SessionID::defaultSessionID(), NetworkSession::create(NetworkSessionCreationParameters()));
#if ENABLE(INDEXED_DATABASE)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.h (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2018-11-28 21:09:09 UTC (rev 238630)
@@ -176,10 +176,6 @@
void preconnectTo(const WebCore::URL&, WebCore::StoredCredentialsPolicy);
-#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- bool shouldLogCookieInformation() const { return m_logCookieInformation; }
-#endif
-
void setSessionIsControlledByAutomation(PAL::SessionID, bool);
bool sessionIsControlledByAutomation(PAL::SessionID) const;
@@ -362,9 +358,6 @@
bool m_diskCacheIsDisabledForTesting;
bool m_canHandleHTTPSServerTrustEvaluation;
Seconds m_loadThrottleLatency;
-#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- bool m_logCookieInformation { false };
-#endif
RefPtr<NetworkCache::Cache> m_cache;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp 2018-11-28 21:09:09 UTC (rev 238630)
@@ -92,9 +92,6 @@
#elif USE(CURL)
encoder << cookiePersistentStorageFile;
#endif
-#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- encoder << logCookieInformation;
-#endif
#if ENABLE(NETWORK_CAPTURE)
encoder << recordReplayMode;
encoder << recordReplayCacheLocation;
@@ -233,11 +230,6 @@
return false;
#endif
-#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- if (!decoder.decode(result.logCookieInformation))
- return false;
-#endif
-
#if ENABLE(NETWORK_CAPTURE)
if (!decoder.decode(result.recordReplayMode))
return false;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h 2018-11-28 21:09:09 UTC (rev 238630)
@@ -107,10 +107,6 @@
String cookiePersistentStorageFile;
#endif
-#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- bool logCookieInformation { false };
-#endif
-
#if ENABLE(NETWORK_CAPTURE)
String recordReplayMode;
String recordReplayCacheLocation;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2018-11-28 21:09:09 UTC (rev 238630)
@@ -550,7 +550,7 @@
}
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- if (shouldLogCookieInformation())
+ if (shouldLogCookieInformation(sessionID()))
logCookieInformation();
#endif
@@ -885,7 +885,7 @@
#endif
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- if (shouldLogCookieInformation())
+ if (shouldLogCookieInformation(sessionID()))
logCookieInformation();
#endif
@@ -984,9 +984,11 @@
}
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
-bool NetworkResourceLoader::shouldLogCookieInformation()
+bool NetworkResourceLoader::shouldLogCookieInformation(const PAL::SessionID& sessionID)
{
- return NetworkProcess::singleton().shouldLogCookieInformation();
+ if (auto session = SessionTracker::networkSession(sessionID))
+ return session->shouldLogCookieInformation();
+ return false;
}
static String escapeForJSON(String s)
@@ -1001,7 +1003,7 @@
void NetworkResourceLoader::logCookieInformation() const
{
- ASSERT(shouldLogCookieInformation());
+ ASSERT(shouldLogCookieInformation(sessionID()));
auto networkStorageSession = WebCore::NetworkStorageSession::storageSession(sessionID());
ASSERT(networkStorageSession);
@@ -1011,7 +1013,7 @@
static void logBlockedCookieInformation(const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const WebCore::URL& firstParty, const SameSiteInfo& sameSiteInfo, const WebCore::URL& url, const String& referrer, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, std::optional<uint64_t> identifier)
{
- ASSERT(NetworkResourceLoader::shouldLogCookieInformation());
+ ASSERT(NetworkResourceLoader::shouldLogCookieInformation(networkStorageSession.sessionID()));
auto escapedURL = escapeForJSON(url.string());
auto escapedFirstParty = escapeForJSON(firstParty.string());
@@ -1038,7 +1040,7 @@
static void logCookieInformationInternal(const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const WebCore::URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const WebCore::URL& url, const String& referrer, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, std::optional<uint64_t> identifier)
{
- ASSERT(NetworkResourceLoader::shouldLogCookieInformation());
+ ASSERT(NetworkResourceLoader::shouldLogCookieInformation(networkStorageSession.sessionID()));
Vector<WebCore::Cookie> cookies;
if (!networkStorageSession.getRawCookies(firstParty, sameSiteInfo, url, frameID, pageID, cookies))
@@ -1099,7 +1101,7 @@
void NetworkResourceLoader::logCookieInformation(const String& label, const void* loggedObject, const NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, std::optional<uint64_t> identifier)
{
- ASSERT(shouldLogCookieInformation());
+ ASSERT(shouldLogCookieInformation(networkStorageSession.sessionID()));
if (networkStorageSession.shouldBlockCookies(firstParty, url, frameID, pageID))
logBlockedCookieInformation(label, loggedObject, networkStorageSession, firstParty, sameSiteInfo, url, referrer, frameID, pageID, identifier);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h 2018-11-28 21:09:09 UTC (rev 238630)
@@ -112,7 +112,7 @@
bool isAlwaysOnLoggingAllowed() const;
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- static bool shouldLogCookieInformation();
+ static bool shouldLogCookieInformation(const PAL::SessionID&);
static void logCookieInformation(const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::SameSiteInfo&, const WebCore::URL&, const String& referrer, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, std::optional<uint64_t> identifier);
#endif
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSession.h (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/NetworkSession.h 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSession.h 2018-11-28 21:09:09 UTC (rev 238630)
@@ -47,6 +47,7 @@
virtual void invalidateAndCancel();
virtual void clearCredentials() { };
+ virtual bool shouldLogCookieInformation() const { return false; }
PAL::SessionID sessionID() const { return m_sessionID; }
WebCore::NetworkStorageSession& networkStorageSession() const;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h 2018-11-28 21:09:09 UTC (rev 238630)
@@ -55,6 +55,7 @@
RetainPtr<CFDictionaryRef> proxyConfiguration;
String sourceApplicationBundleIdentifier;
String sourceApplicationSecondaryIdentifier;
+ bool shouldLogCookieInformation { false };
#endif
#if USE(CURL)
WebCore::CurlProxySettings proxySettings;
@@ -70,6 +71,7 @@
IPC::encode(encoder, proxyConfiguration.get());
encoder << sourceApplicationBundleIdentifier;
encoder << sourceApplicationSecondaryIdentifier;
+ encoder << shouldLogCookieInformation;
#endif
#if USE(CURL)
encoder << proxySettings;
@@ -106,6 +108,11 @@
decoder >> sourceApplicationSecondaryIdentifier;
if (!sourceApplicationSecondaryIdentifier)
return std::nullopt;
+
+ std::optional<bool> shouldLogCookieInformation;
+ decoder >> shouldLogCookieInformation;
+ if (!shouldLogCookieInformation)
+ return std::nullopt;
#endif
#if USE(CURL)
@@ -123,6 +130,7 @@
, WTFMove(proxyConfiguration)
, WTFMove(*sourceApplicationBundleIdentifier)
, WTFMove(*sourceApplicationSecondaryIdentifier)
+ , WTFMove(*shouldLogCookieInformation)
#endif
#if USE(CURL)
, WTFMove(*proxySettings)
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2018-11-28 21:09:09 UTC (rev 238630)
@@ -229,7 +229,7 @@
#if ENABLE(RESOURCE_LOAD_STATISTICS)
if (shouldBlockCookies) {
#if !RELEASE_LOG_DISABLED
- if (NetworkProcess::singleton().shouldLogCookieInformation())
+ if (m_session->shouldLogCookieInformation())
RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Blocking cookies for URL %s", this, pageID, frameID, (unsigned long)[m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String);
#else
LOG(NetworkSession, "%llu Blocking cookies for URL %s", [m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String);
@@ -346,7 +346,7 @@
#if ENABLE(RESOURCE_LOAD_STATISTICS)
shouldBlockCookies = m_session->networkStorageSession().shouldBlockCookies(request, m_frameID, m_pageID);
#if !RELEASE_LOG_DISABLED
- if (NetworkProcess::singleton().shouldLogCookieInformation())
+ if (m_session->shouldLogCookieInformation())
RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: %s cookies for redirect URL %s", this, m_pageID, m_frameID, (unsigned long)[m_task taskIdentifier], (shouldBlockCookies ? "Blocking" : "Not blocking"), request.url().string().utf8().data());
#else
LOG(NetworkSession, "%llu %s cookies for redirect URL %s", [m_task taskIdentifier], (shouldBlockCookies ? "Blocking" : "Not blocking"), request.url().string().utf8().data());
@@ -362,7 +362,7 @@
if (!shouldBlockCookies) {
#if !RELEASE_LOG_DISABLED
- if (NetworkProcess::singleton().shouldLogCookieInformation())
+ if (m_session->shouldLogCookieInformation())
RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Not partitioning cookies for redirect URL %s", this, m_pageID, m_frameID, (unsigned long)[m_task taskIdentifier], request.url().string().utf8().data());
#else
LOG(NetworkSession, "%llu Not partitioning cookies for redirect URL %s", [m_task taskIdentifier], request.url().string().utf8().data());
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h 2018-11-28 21:09:09 UTC (rev 238630)
@@ -70,6 +70,7 @@
void invalidateAndCancel() override;
void clearCredentials() override;
+ bool shouldLogCookieInformation() const override { return m_shouldLogCookieInformation; }
HashMap<NetworkDataTaskCocoa::TaskIdentifier, NetworkDataTaskCocoa*> m_dataTaskMapWithCredentials;
HashMap<NetworkDataTaskCocoa::TaskIdentifier, NetworkDataTaskCocoa*> m_dataTaskMapWithoutState;
@@ -82,6 +83,7 @@
String m_boundInterfaceIdentifier;
RetainPtr<CFDictionaryRef> m_proxyConfiguration;
+ bool m_shouldLogCookieInformation { false };
String m_sourceApplicationBundleIdentifier;
String m_sourceApplicationSecondaryIdentifier;
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (238629 => 238630)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-11-28 21:09:09 UTC (rev 238630)
@@ -644,6 +644,7 @@
: NetworkSession(parameters.sessionID)
, m_boundInterfaceIdentifier(parameters.boundInterfaceIdentifier)
, m_proxyConfiguration(parameters.proxyConfiguration)
+ , m_shouldLogCookieInformation(parameters.shouldLogCookieInformation)
{
ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (238629 => 238630)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2018-11-28 21:09:09 UTC (rev 238630)
@@ -294,10 +294,6 @@
parameters.storageAccessAPIEnabled = storageAccessAPIEnabled();
parameters.suppressesConnectionTerminationOnSystemChange = m_configuration->suppressesConnectionTerminationOnSystemChange();
-#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
- parameters.logCookieInformation = [defaults boolForKey:WebKitLogCookieInformationDefaultsKey];
-#endif
-
#if ENABLE(NETWORK_CAPTURE)
parameters.recordReplayMode = [defaults stringForKey:WebKitRecordReplayModeDefaultsKey];
parameters.recordReplayCacheLocation = [defaults stringForKey:WebKitRecordReplayCacheLocationDefaultsKey];
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (238629 => 238630)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2018-11-28 20:53:17 UTC (rev 238629)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2018-11-28 21:09:09 UTC (rev 238630)
@@ -57,6 +57,13 @@
resolveDirectoriesIfNecessary();
+#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
+ static NSString * const WebKitLogCookieInformationDefaultsKey = @"WebKitLogCookieInformation";
+ bool shouldLogCookieInformation = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitLogCookieInformationDefaultsKey];
+#else
+ bool shouldLogCookieInformation = false;
+#endif
+
WebsiteDataStoreParameters parameters;
parameters.networkSessionParameters = {
m_sessionID,
@@ -65,6 +72,7 @@
m_proxyConfiguration,
m_configuration.sourceApplicationBundleIdentifier,
m_configuration.sourceApplicationSecondaryIdentifier,
+ shouldLogCookieInformation,
};
auto cookieFile = resolvedCookieStorageFile();