https://bugs.webkit.org/show_bug.cgi?id=202990
Reviewed by Brady Eidson.
Source/WebCore:
This macro allowed us to adopt CFNetwork SPI, but now that the SPI is available everywhere we support, we don't need it.
* platform/network/NetworkLoadMetrics.h:
* platform/network/cocoa/NetworkLoadMetrics.mm:
(WebCore::copyTimingData):
(WebCore::setCollectsTimingData): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
Source/WebKit:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
Source/WTF:
* wtf/Platform.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251862
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2019-10-31 Alex Christensen <achristensen@webkit.org>
+
+ Remove unneeded HAVE_TIMINGDATAOPTIONS
+ https://bugs.webkit.org/show_bug.cgi?id=202990
+
+ Reviewed by Brady Eidson.
+
+ * wtf/Platform.h:
+
2019-10-31 Yusuke Suzuki <ysuzuki@apple.com>
[JSC] DateMath should have TimeClipped version
#endif
#if PLATFORM(COCOA)
-#define HAVE_TIMINGDATAOPTIONS 1
-#endif
-
-#if PLATFORM(COCOA)
#define USE_AUDIO_SESSION 1
#endif
2019-10-31 Alex Christensen <achristensen@webkit.org>
+ Remove unneeded HAVE_TIMINGDATAOPTIONS
+ https://bugs.webkit.org/show_bug.cgi?id=202990
+
+ Reviewed by Brady Eidson.
+
+ This macro allowed us to adopt CFNetwork SPI, but now that the SPI is available everywhere we support, we don't need it.
+
+ * platform/network/NetworkLoadMetrics.h:
+ * platform/network/cocoa/NetworkLoadMetrics.mm:
+ (WebCore::copyTimingData):
+ (WebCore::setCollectsTimingData): Deleted.
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::createNSURLConnection):
+
+2019-10-31 Alex Christensen <achristensen@webkit.org>
+
Use SecurityOriginData in NetworkProcess where possible without other changes
https://bugs.webkit.org/show_bug.cgi?id=203615
WEBCORE_EXPORT void copyTimingData(NSDictionary *timingData, NetworkLoadMetrics&);
#endif
-#if PLATFORM(COCOA) && !HAVE(TIMINGDATAOPTIONS)
-WEBCORE_EXPORT void setCollectsTimingData();
-#endif
-
template<class Encoder>
void NetworkLoadMetrics::encode(Encoder& encoder) const
{
// NOTE: responseEnd is not populated in this code path.
}
-
-#if !HAVE(TIMINGDATAOPTIONS)
-void setCollectsTimingData()
-{
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- [NSURLConnection _setCollectsTimingData:YES];
- [NSURLConnection _collectTimingDataWithOptions:TimingDataCollectionNStatsOff | TimingDataCollectionConnectionDataOff];
- });
-}
-#endif
}
void ResourceHandle::createNSURLConnection(id delegate, bool shouldUseCredentialStorage, bool shouldContentSniff, bool shouldContentEncodingSniff, SchedulingBehavior schedulingBehavior, NSDictionary *connectionProperties)
#endif
{
-#if !HAVE(TIMINGDATAOPTIONS)
- setCollectsTimingData();
-#endif
-
// Credentials for ftp can only be passed in URL, the connection:didReceiveAuthenticationChallenge: delegate call won't be made.
if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty()) && !firstRequest().url().protocolIsInHTTPFamily()) {
URL urlWithCredentials(firstRequest().url());
NSMutableDictionary *propertyDictionary = [NSMutableDictionary dictionaryWithObject:streamProperties forKey:@"kCFURLConnectionSocketStreamProperties"];
const bool usesCache = true;
#endif
-#if HAVE(TIMINGDATAOPTIONS)
[propertyDictionary setObject:@{@"_kCFURLConnectionPropertyTimingDataOptions": @(_TimingDataOptionsEnableW3CNavigationTiming)} forKey:@"kCFURLConnectionURLConnectionProperties"];
-#endif
// This is used to signal that to CFNetwork that this connection should be considered
// web content for purposes of App Transport Security.
2019-10-31 Alex Christensen <achristensen@webkit.org>
+ Remove unneeded HAVE_TIMINGDATAOPTIONS
+ https://bugs.webkit.org/show_bug.cgi?id=202990
+
+ Reviewed by Brady Eidson.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
+
+2019-10-31 Alex Christensen <achristensen@webkit.org>
+
Use SecurityOriginData in NetworkProcess where possible without other changes
https://bugs.webkit.org/show_bug.cgi?id=203615
networkProcess.supplement<LegacyCustomProtocolManager>()->registerProtocolClass(configuration);
#endif
-#if HAVE(TIMINGDATAOPTIONS)
configuration._timingDataOptions = _TimingDataOptionsEnableW3CNavigationTiming;
-#else
- setCollectsTimingData();
-#endif
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || PLATFORM(IOS_FAMILY)
// FIXME: Replace @"kCFStreamPropertyAutoErrorOnSystemChange" with a constant from the SDK once rdar://problem/40650244 is in a build.