[Resource Timing] Gather timing information with reliable responseEnd time
[WebKit-https.git] / Source / WebCore / platform / network / cf / ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp
index 9f00c3a..17fdc7f 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "ResourceHandleCFURLConnectionDelegateWithOperationQueue.h"
 
-#if USE(CFNETWORK)
+#if USE(CFURLCONNECTION)
 
 #include "AuthenticationCF.h"
 #include "AuthenticationChallenge.h"
@@ -156,12 +156,12 @@ void ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse
         
         ResourceResponse resourceResponse(cfResponse);
 #if ENABLE(WEB_TIMING)
-        ResourceHandle::getConnectionTimingData(connection, resourceResponse.networkLoadTiming());
+        ResourceHandle::getConnectionTimingData(connection, resourceResponse.deprecatedNetworkLoadMetrics());
 #else
         UNUSED_PARAM(connection);
 #endif
         
-        m_handle->client()->didReceiveResponseAsync(m_handle, WTFMove(resourceResponse));
+        m_handle->didReceiveResponse(WTFMove(resourceResponse));
     });
     dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
 }
@@ -195,7 +195,7 @@ void ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading()
 
         LOG(Network, "CFNet - ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading(handle=%p) (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
 
-        m_handle->client()->didFinishLoading(m_handle, 0);
+        m_handle->client()->didFinishLoading(m_handle);
     });
 }
 
@@ -347,4 +347,4 @@ void ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueCanAuthent
 #endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
 } // namespace WebCore
 
-#endif // USE(CFNETWORK)
+#endif // USE(CFURLCONNECTION)