Diff
Modified: trunk/Source/WebKit/ChangeLog (238653 => 238654)
--- trunk/Source/WebKit/ChangeLog 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/ChangeLog 2018-11-29 02:18:37 UTC (rev 238654)
@@ -1,3 +1,44 @@
+2018-11-28 Alex Christensen <achristen...@webkit.org>
+
+ Move loadThrottleLatency from NetworkProcessCreationParameters to NetworkSessionCreationParameters
+ https://bugs.webkit.org/show_bug.cgi?id=192122
+
+ Reviewed by Dean Jackson.
+
+ This is part of an effort to reduce global variables in the NetworkProcess.
+
+ * NetworkProcess/NetworkLoad.cpp:
+ (WebKit::NetworkLoad::NetworkLoad):
+ (WebKit::NetworkLoad::didReceiveResponse):
+ * NetworkProcess/NetworkLoad.h:
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::initializeNetworkProcess):
+ * NetworkProcess/NetworkProcess.h:
+ (WebKit::NetworkProcess::loadThrottleLatency const): Deleted.
+ * NetworkProcess/NetworkProcessCreationParameters.cpp:
+ (WebKit::NetworkProcessCreationParameters::encode const):
+ (WebKit::NetworkProcessCreationParameters::decode):
+ * NetworkProcess/NetworkSession.h:
+ (WebKit::NetworkSession::loadThrottleLatency const):
+ * NetworkProcess/NetworkSessionCreationParameters.cpp: Added.
+ (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
+ (WebKit::NetworkSessionCreationParameters::encode const):
+ (WebKit::NetworkSessionCreationParameters::decode):
+ * NetworkProcess/NetworkSessionCreationParameters.h:
+ (WebKit::NetworkSessionCreationParameters::encode const): Deleted.
+ (WebKit::NetworkSessionCreationParameters::decode): Deleted.
+ * NetworkProcess/cocoa/NetworkSessionCocoa.h:
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
+ * Shared/WebsiteDataStoreParameters.cpp:
+ (WebKit::WebsiteDataStoreParameters::privateSessionParameters):
+ * Sources.txt:
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::WebProcessPool::platformInitializeNetworkProcess):
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::parameters):
+ * WebKit.xcodeproj/project.pbxproj:
+
2018-11-15 Megan Gardner <megan_gard...@apple.com>
Move Lookup Code for better cross platform usage
Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp (238653 => 238654)
--- trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp 2018-11-29 02:18:37 UTC (rev 238654)
@@ -70,6 +70,7 @@
NetworkLoad::NetworkLoad(NetworkLoadClient& client, NetworkLoadParameters&& parameters, NetworkSession& networkSession)
: m_client(client)
, m_parameters(WTFMove(parameters))
+ , m_loadThrottleLatency(networkSession.loadThrottleLatency())
, m_currentRequest(m_parameters.request)
{
#if ENABLE(NETWORK_CAPTURE)
@@ -268,9 +269,8 @@
return;
}
- auto delay = NetworkProcess::singleton().loadThrottleLatency();
- if (delay > 0_s) {
- m_throttle = std::make_unique<Throttle>(*this, delay, WTFMove(response), WTFMove(completionHandler));
+ if (m_loadThrottleLatency > 0_s) {
+ m_throttle = std::make_unique<Throttle>(*this, m_loadThrottleLatency, WTFMove(response), WTFMove(completionHandler));
return;
}
Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoad.h (238653 => 238654)
--- trunk/Source/WebKit/NetworkProcess/NetworkLoad.h 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoad.h 2018-11-29 02:18:37 UTC (rev 238654)
@@ -97,6 +97,7 @@
struct Throttle;
std::unique_ptr<Throttle> m_throttle;
+ Seconds m_loadThrottleLatency;
WebCore::ResourceRequest m_currentRequest; // Updated on redirects.
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (238653 => 238654)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2018-11-29 02:18:37 UTC (rev 238654)
@@ -292,7 +292,6 @@
AtomicString::init();
m_suppressMemoryPressureHandler = parameters.shouldSuppressMemoryPressureHandler;
- m_loadThrottleLatency = parameters.loadThrottleLatency;
if (!m_suppressMemoryPressureHandler) {
auto& memoryPressureHandler = MemoryPressureHandler::singleton();
memoryPressureHandler.setLowMemoryHandler([this] (Critical critical, Synchronous) {
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.h (238653 => 238654)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2018-11-29 02:18:37 UTC (rev 238654)
@@ -169,8 +169,6 @@
void resetCacheMaxAgeCapForPrevalentResources(PAL::SessionID, uint64_t contextId);
#endif
- Seconds loadThrottleLatency() const { return m_loadThrottleLatency; }
-
using CacheStorageParametersCallback = CompletionHandler<void(const String&, uint64_t quota)>;
void cacheStorageParameters(PAL::SessionID, CacheStorageParametersCallback&&);
@@ -357,7 +355,6 @@
bool m_suppressMemoryPressureHandler { false };
bool m_diskCacheIsDisabledForTesting;
bool m_canHandleHTTPSServerTrustEvaluation;
- Seconds m_loadThrottleLatency;
RefPtr<NetworkCache::Cache> m_cache;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp (238653 => 238654)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp 2018-11-29 02:18:37 UTC (rev 238654)
@@ -65,7 +65,6 @@
#endif
encoder << shouldSuppressMemoryPressureHandler;
encoder << shouldUseTestingNetworkSession;
- encoder << loadThrottleLatency;
encoder << urlSchemesRegisteredForCustomProtocols;
encoder << presentingApplicationPID;
#if PLATFORM(COCOA)
@@ -181,8 +180,6 @@
return false;
if (!decoder.decode(result.shouldUseTestingNetworkSession))
return false;
- if (!decoder.decode(result.loadThrottleLatency))
- return false;
if (!decoder.decode(result.urlSchemesRegisteredForCustomProtocols))
return false;
if (!decoder.decode(result.presentingApplicationPID))
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSession.h (238653 => 238654)
--- trunk/Source/WebKit/NetworkProcess/NetworkSession.h 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSession.h 2018-11-29 02:18:37 UTC (rev 238654)
@@ -29,6 +29,7 @@
#include <wtf/HashSet.h>
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
+#include <wtf/Seconds.h>
namespace WebCore {
class AuthenticationChallenge;
@@ -48,6 +49,7 @@
virtual void invalidateAndCancel();
virtual void clearCredentials() { };
virtual bool shouldLogCookieInformation() const { return false; }
+ virtual Seconds loadThrottleLatency() const { return { }; }
PAL::SessionID sessionID() const { return m_sessionID; }
WebCore::NetworkStorageSession& networkStorageSession() const;
Added: trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp (0 => 238654)
--- trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp (rev 0)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp 2018-11-29 02:18:37 UTC (rev 238654)
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2018 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 "NetworkSessionCreationParameters.h"
+
+#include "ArgumentCoders.h"
+
+#if PLATFORM(COCOA)
+#include "ArgumentCodersCF.h"
+#endif
+
+#if USE(CURL)
+#include "WebCoreArgumentCoders.h"
+#endif
+
+namespace WebKit {
+
+NetworkSessionCreationParameters NetworkSessionCreationParameters::privateSessionParameters(const PAL::SessionID& sessionID)
+{
+ return { sessionID, { }, AllowsCellularAccess::Yes
+#if PLATFORM(COCOA)
+ , { }, { }, { }, false, { }
+#endif
+#if USE(CURL)
+ , { }
+#endif
+ };
+}
+
+void NetworkSessionCreationParameters::encode(IPC::Encoder& encoder) const
+{
+ encoder << sessionID;
+ encoder << boundInterfaceIdentifier;
+ encoder << allowsCellularAccess;
+#if PLATFORM(COCOA)
+ IPC::encode(encoder, proxyConfiguration.get());
+ encoder << sourceApplicationBundleIdentifier;
+ encoder << sourceApplicationSecondaryIdentifier;
+ encoder << shouldLogCookieInformation;
+ encoder << loadThrottleLatency;
+#endif
+#if USE(CURL)
+ encoder << proxySettings;
+#endif
+}
+
+std::optional<NetworkSessionCreationParameters> NetworkSessionCreationParameters::decode(IPC::Decoder& decoder)
+{
+ PAL::SessionID sessionID;
+ if (!decoder.decode(sessionID))
+ return std::nullopt;
+
+ std::optional<String> boundInterfaceIdentifier;
+ decoder >> boundInterfaceIdentifier;
+ if (!boundInterfaceIdentifier)
+ return std::nullopt;
+
+ std::optional<AllowsCellularAccess> allowsCellularAccess;
+ decoder >> allowsCellularAccess;
+ if (!allowsCellularAccess)
+ return std::nullopt;
+
+#if PLATFORM(COCOA)
+ RetainPtr<CFDictionaryRef> proxyConfiguration;
+ if (!IPC::decode(decoder, proxyConfiguration))
+ return std::nullopt;
+
+ std::optional<String> sourceApplicationBundleIdentifier;
+ decoder >> sourceApplicationBundleIdentifier;
+ if (!sourceApplicationBundleIdentifier)
+ return std::nullopt;
+
+ std::optional<String> sourceApplicationSecondaryIdentifier;
+ decoder >> sourceApplicationSecondaryIdentifier;
+ if (!sourceApplicationSecondaryIdentifier)
+ return std::nullopt;
+
+ std::optional<bool> shouldLogCookieInformation;
+ decoder >> shouldLogCookieInformation;
+ if (!shouldLogCookieInformation)
+ return std::nullopt;
+
+ std::optional<Seconds> loadThrottleLatency;
+ decoder >> loadThrottleLatency;
+ if (!loadThrottleLatency)
+ return std::nullopt;
+#endif
+
+#if USE(CURL)
+ std::optional<WebCore::CurlProxySettings> proxySettings;
+ decoder >> proxySettings;
+ if (!proxySettings)
+ return std::nullopt;
+#endif
+
+ return {{
+ sessionID
+ , WTFMove(*boundInterfaceIdentifier)
+ , WTFMove(*allowsCellularAccess)
+#if PLATFORM(COCOA)
+ , WTFMove(proxyConfiguration)
+ , WTFMove(*sourceApplicationBundleIdentifier)
+ , WTFMove(*sourceApplicationSecondaryIdentifier)
+ , WTFMove(*shouldLogCookieInformation)
+ , WTFMove(*loadThrottleLatency)
+#endif
+#if USE(CURL)
+ , WTFMove(*proxySettings)
+#endif
+ }};
+}
+
+} // namespace WebKit
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h (238653 => 238654)
--- trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h 2018-11-29 02:18:37 UTC (rev 238654)
@@ -25,28 +25,27 @@
#pragma once
-#include "ArgumentCoders.h"
#include <pal/SessionID.h>
+#include <wtf/Seconds.h>
#include <wtf/text/WTFString.h>
-#if PLATFORM(COCOA)
-#include "ArgumentCodersCF.h"
-#endif
-
#if USE(CURL)
-#include "WebCoreArgumentCoders.h"
#include <WebCore/CurlProxySettings.h>
#endif
+namespace IPC {
+class Encoder;
+class Decoder;
+}
+
namespace WebKit {
-class LegacyCustomProtocolManager;
-
-enum class AllowsCellularAccess { No, Yes };
+enum class AllowsCellularAccess : bool { No, Yes };
struct NetworkSessionCreationParameters {
void encode(IPC::Encoder&) const;
static std::optional<NetworkSessionCreationParameters> decode(IPC::Decoder&);
+ static NetworkSessionCreationParameters privateSessionParameters(const PAL::SessionID&);
PAL::SessionID sessionID { PAL::SessionID::defaultSessionID() };
String boundInterfaceIdentifier;
@@ -56,6 +55,7 @@
String sourceApplicationBundleIdentifier;
String sourceApplicationSecondaryIdentifier;
bool shouldLogCookieInformation { false };
+ Seconds loadThrottleLatency;
#endif
#if USE(CURL)
WebCore::CurlProxySettings proxySettings;
@@ -62,90 +62,4 @@
#endif
};
-inline void NetworkSessionCreationParameters::encode(IPC::Encoder& encoder) const
-{
- encoder << sessionID;
- encoder << boundInterfaceIdentifier;
- encoder << allowsCellularAccess;
-#if PLATFORM(COCOA)
- IPC::encode(encoder, proxyConfiguration.get());
- encoder << sourceApplicationBundleIdentifier;
- encoder << sourceApplicationSecondaryIdentifier;
- encoder << shouldLogCookieInformation;
-#endif
-#if USE(CURL)
- encoder << proxySettings;
-#endif
-}
-
-inline std::optional<NetworkSessionCreationParameters> NetworkSessionCreationParameters::decode(IPC::Decoder& decoder)
-{
- PAL::SessionID sessionID;
- if (!decoder.decode(sessionID))
- return std::nullopt;
-
- std::optional<String> boundInterfaceIdentifier;
- decoder >> boundInterfaceIdentifier;
- if (!boundInterfaceIdentifier)
- return std::nullopt;
-
- std::optional<AllowsCellularAccess> allowsCellularAccess;
- decoder >> allowsCellularAccess;
- if (!allowsCellularAccess)
- return std::nullopt;
-
-#if PLATFORM(COCOA)
- RetainPtr<CFDictionaryRef> proxyConfiguration;
- if (!IPC::decode(decoder, proxyConfiguration))
- return std::nullopt;
-
- std::optional<String> sourceApplicationBundleIdentifier;
- decoder >> sourceApplicationBundleIdentifier;
- if (!sourceApplicationBundleIdentifier)
- return std::nullopt;
-
- std::optional<String> sourceApplicationSecondaryIdentifier;
- decoder >> sourceApplicationSecondaryIdentifier;
- if (!sourceApplicationSecondaryIdentifier)
- return std::nullopt;
-
- std::optional<bool> shouldLogCookieInformation;
- decoder >> shouldLogCookieInformation;
- if (!shouldLogCookieInformation)
- return std::nullopt;
-#endif
-
-#if USE(CURL)
- std::optional<WebCore::CurlProxySettings> proxySettings;
- decoder >> proxySettings;
- if (!proxySettings)
- return std::nullopt;
-#endif
-
- return {{
- sessionID
- , WTFMove(*boundInterfaceIdentifier)
- , WTFMove(*allowsCellularAccess)
-#if PLATFORM(COCOA)
- , WTFMove(proxyConfiguration)
- , WTFMove(*sourceApplicationBundleIdentifier)
- , WTFMove(*sourceApplicationSecondaryIdentifier)
- , WTFMove(*shouldLogCookieInformation)
-#endif
-#if USE(CURL)
- , WTFMove(*proxySettings)
-#endif
- }};
-}
-
} // namespace WebKit
-
-namespace WTF {
-template<> struct EnumTraits<WebKit::AllowsCellularAccess> {
- using values = EnumValues<
- WebKit::AllowsCellularAccess,
- WebKit::AllowsCellularAccess::No,
- WebKit::AllowsCellularAccess::Yes
- >;
-};
-}
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h (238653 => 238654)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h 2018-11-29 02:18:37 UTC (rev 238654)
@@ -71,6 +71,7 @@
void invalidateAndCancel() override;
void clearCredentials() override;
bool shouldLogCookieInformation() const override { return m_shouldLogCookieInformation; }
+ Seconds loadThrottleLatency() const override { return m_loadThrottleLatency; }
HashMap<NetworkDataTaskCocoa::TaskIdentifier, NetworkDataTaskCocoa*> m_dataTaskMapWithCredentials;
HashMap<NetworkDataTaskCocoa::TaskIdentifier, NetworkDataTaskCocoa*> m_dataTaskMapWithoutState;
@@ -84,6 +85,7 @@
String m_boundInterfaceIdentifier;
RetainPtr<CFDictionaryRef> m_proxyConfiguration;
bool m_shouldLogCookieInformation { false };
+ Seconds m_loadThrottleLatency;
String m_sourceApplicationBundleIdentifier;
String m_sourceApplicationSecondaryIdentifier;
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (238653 => 238654)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-11-29 02:18:37 UTC (rev 238654)
@@ -645,6 +645,7 @@
, m_boundInterfaceIdentifier(parameters.boundInterfaceIdentifier)
, m_proxyConfiguration(parameters.proxyConfiguration)
, m_shouldLogCookieInformation(parameters.shouldLogCookieInformation)
+ , m_loadThrottleLatency(parameters.loadThrottleLatency)
{
ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));
Modified: trunk/Source/WebKit/Shared/WebsiteDataStoreParameters.cpp (238653 => 238654)
--- trunk/Source/WebKit/Shared/WebsiteDataStoreParameters.cpp 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/Shared/WebsiteDataStoreParameters.cpp 2018-11-29 02:18:37 UTC (rev 238654)
@@ -113,11 +113,7 @@
WebsiteDataStoreParameters WebsiteDataStoreParameters::privateSessionParameters(PAL::SessionID sessionID)
{
ASSERT(sessionID.isEphemeral());
- return { { }, { }, { }, { sessionID, { }, AllowsCellularAccess::Yes
-#if PLATFORM(COCOA)
- , nullptr , { } , { }
-#endif
- }
+ return { { }, { }, { }, NetworkSessionCreationParameters::privateSessionParameters(sessionID)
#if ENABLE(INDEXED_DATABASE)
, { }, { }
#endif
Modified: trunk/Source/WebKit/Sources.txt (238653 => 238654)
--- trunk/Source/WebKit/Sources.txt 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/Sources.txt 2018-11-29 02:18:37 UTC (rev 238654)
@@ -35,6 +35,7 @@
NetworkProcess/NetworkResourceLoadParameters.cpp
NetworkProcess/NetworkResourceLoader.cpp
NetworkProcess/NetworkSession.cpp
+NetworkProcess/NetworkSessionCreationParameters.cpp
NetworkProcess/NetworkSocketStream.cpp
NetworkProcess/PingLoad.cpp
NetworkProcess/PreconnectTask.cpp
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (238653 => 238654)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2018-11-29 02:18:37 UTC (rev 238654)
@@ -75,7 +75,6 @@
static NSString * const WebKitNetworkCacheEfficacyLoggingEnabledDefaultsKey = @"WebKitNetworkCacheEfficacyLoggingEnabled";
static NSString * const WebKitSuppressMemoryPressureHandlerDefaultsKey = @"WebKitSuppressMemoryPressureHandler";
-static NSString * const WebKitNetworkLoadThrottleLatencyMillisecondsDefaultsKey = @"WebKitNetworkLoadThrottleLatencyMilliseconds";
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
static NSString * const WebKitLogCookieInformationDefaultsKey = @"WebKitLogCookieInformation";
@@ -283,7 +282,6 @@
#endif
parameters.shouldSuppressMemoryPressureHandler = [defaults boolForKey:WebKitSuppressMemoryPressureHandlerDefaultsKey];
- parameters.loadThrottleLatency = Seconds { [defaults integerForKey:WebKitNetworkLoadThrottleLatencyMillisecondsDefaultsKey] / 1000. };
#if PLATFORM(MAC)
ASSERT(parameters.uiProcessCookieStorageIdentifier.isEmpty());
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (238653 => 238654)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2018-11-29 02:18:37 UTC (rev 238654)
@@ -51,6 +51,8 @@
return dataStoresWithStorageManagers;
}
+static NSString * const WebKitNetworkLoadThrottleLatencyMillisecondsDefaultsKey = @"WebKitNetworkLoadThrottleLatencyMilliseconds";
+
WebsiteDataStoreParameters WebsiteDataStore::parameters()
{
ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));
@@ -57,9 +59,10 @@
resolveDirectoriesIfNecessary();
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
static NSString * const WebKitLogCookieInformationDefaultsKey = @"WebKitLogCookieInformation";
- bool shouldLogCookieInformation = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitLogCookieInformationDefaultsKey];
+ bool shouldLogCookieInformation = [defaults boolForKey:WebKitLogCookieInformationDefaultsKey];
#else
bool shouldLogCookieInformation = false;
#endif
@@ -73,6 +76,7 @@
m_configuration.sourceApplicationBundleIdentifier,
m_configuration.sourceApplicationSecondaryIdentifier,
shouldLogCookieInformation,
+ Seconds { [defaults integerForKey:WebKitNetworkLoadThrottleLatencyMillisecondsDefaultsKey] / 1000. }
};
auto cookieFile = resolvedCookieStorageFile();
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (238653 => 238654)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2018-11-29 01:41:15 UTC (rev 238653)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2018-11-29 02:18:37 UTC (rev 238654)
@@ -3455,6 +3455,7 @@
5C7C88DC1D0F41A0009D2F6D /* WebSocketProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketProvider.h; path = Network/WebSocketProvider.h; sourceTree = "<group>"; };
5C84CF901F96AC4E00B6705A /* NetworkSessionCreationParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkSessionCreationParameters.h; sourceTree = "<group>"; };
5C85C7861C3F23C50061A4FA /* PendingDownload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PendingDownload.cpp; sourceTree = "<group>"; };
+ 5C89DF5621AF61FF004645E8 /* NetworkSessionCreationParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkSessionCreationParameters.cpp; sourceTree = "<group>"; };
5C8BC796218CB58A00813886 /* SafeBrowsing.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = SafeBrowsing.xcassets; path = Resources/SafeBrowsing.xcassets; sourceTree = "<group>"; };
5C8DD37C1FE4501100F2A556 /* APIWebsitePolicies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIWebsitePolicies.h; sourceTree = "<group>"; };
5C8DD37D1FE4501100F2A556 /* APIWebsitePolicies.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIWebsitePolicies.cpp; sourceTree = "<group>"; };
@@ -6434,6 +6435,7 @@
5C1426E61C23F80500D41183 /* NetworkResourceLoadParameters.h */,
532159521DBAE6FC0054AA3C /* NetworkSession.cpp */,
5C20CB9E1BB0DD1800895BB1 /* NetworkSession.h */,
+ 5C89DF5621AF61FF004645E8 /* NetworkSessionCreationParameters.cpp */,
5C84CF901F96AC4E00B6705A /* NetworkSessionCreationParameters.h */,
5C0B177D1E7C886700E9123C /* NetworkSocketStream.cpp */,
5C0B177E1E7C886700E9123C /* NetworkSocketStream.h */,