Title: [251862] trunk/Source
Revision
251862
Author
[email protected]
Date
2019-10-31 10:54:01 -0700 (Thu, 31 Oct 2019)

Log Message

Remove unneeded HAVE_TIMINGDATAOPTIONS
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:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (251861 => 251862)


--- trunk/Source/WTF/ChangeLog	2019-10-31 17:52:49 UTC (rev 251861)
+++ trunk/Source/WTF/ChangeLog	2019-10-31 17:54:01 UTC (rev 251862)
@@ -1,3 +1,12 @@
+2019-10-31  Alex Christensen  <[email protected]>
+
+        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  <[email protected]>
 
         [JSC] DateMath should have TimeClipped version

Modified: trunk/Source/WTF/wtf/Platform.h (251861 => 251862)


--- trunk/Source/WTF/wtf/Platform.h	2019-10-31 17:52:49 UTC (rev 251861)
+++ trunk/Source/WTF/wtf/Platform.h	2019-10-31 17:54:01 UTC (rev 251862)
@@ -1276,10 +1276,6 @@
 #endif
 
 #if PLATFORM(COCOA)
-#define HAVE_TIMINGDATAOPTIONS 1
-#endif
-
-#if PLATFORM(COCOA)
 #define USE_AUDIO_SESSION 1
 #endif
 

Modified: trunk/Source/WebCore/ChangeLog (251861 => 251862)


--- trunk/Source/WebCore/ChangeLog	2019-10-31 17:52:49 UTC (rev 251861)
+++ trunk/Source/WebCore/ChangeLog	2019-10-31 17:54:01 UTC (rev 251862)
@@ -1,5 +1,21 @@
 2019-10-31  Alex Christensen  <[email protected]>
 
+        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  <[email protected]>
+
         Use SecurityOriginData in NetworkProcess where possible without other changes
         https://bugs.webkit.org/show_bug.cgi?id=203615
 

Modified: trunk/Source/WebCore/platform/network/NetworkLoadMetrics.h (251861 => 251862)


--- trunk/Source/WebCore/platform/network/NetworkLoadMetrics.h	2019-10-31 17:52:49 UTC (rev 251861)
+++ trunk/Source/WebCore/platform/network/NetworkLoadMetrics.h	2019-10-31 17:54:01 UTC (rev 251862)
@@ -187,10 +187,6 @@
 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
 {

Modified: trunk/Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm (251861 => 251862)


--- trunk/Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm	2019-10-31 17:52:49 UTC (rev 251861)
+++ trunk/Source/WebCore/platform/network/cocoa/NetworkLoadMetrics.mm	2019-10-31 17:54:01 UTC (rev 251862)
@@ -64,16 +64,5 @@
 
     // 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
     
 }

Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (251861 => 251862)


--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2019-10-31 17:52:49 UTC (rev 251861)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm	2019-10-31 17:54:01 UTC (rev 251862)
@@ -141,10 +141,6 @@
 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());
@@ -217,9 +213,7 @@
     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.

Modified: trunk/Source/WebKit/ChangeLog (251861 => 251862)


--- trunk/Source/WebKit/ChangeLog	2019-10-31 17:52:49 UTC (rev 251861)
+++ trunk/Source/WebKit/ChangeLog	2019-10-31 17:54:01 UTC (rev 251862)
@@ -1,5 +1,15 @@
 2019-10-31  Alex Christensen  <[email protected]>
 
+        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  <[email protected]>
+
         Use SecurityOriginData in NetworkProcess where possible without other changes
         https://bugs.webkit.org/show_bug.cgi?id=203615
 

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (251861 => 251862)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2019-10-31 17:52:49 UTC (rev 251861)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2019-10-31 17:54:01 UTC (rev 251862)
@@ -1034,11 +1034,7 @@
     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.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to