[Curl] Compile errors; ResourceResponseBase::resourceLoadTiming() has changed return...
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jun 2015 17:09:57 +0000 (17:09 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jun 2015 17:09:57 +0000 (17:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146343

Reviewed by Brent Fulgham.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::calculateWebTimingInformations):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::initializeHandle):
(WebCore::ResourceHandleManager::initCookieSession):
(WebCore::sockoptfunction): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186000 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/network/curl/ResourceHandleManager.cpp

index 62d16fd..74d3812 100644 (file)
@@ -1,3 +1,17 @@
+2015-06-26  Per Arne Vollan  <peavo@outlook.com>
+
+        [Curl] Compile errors; ResourceResponseBase::resourceLoadTiming() has changed return type.
+        https://bugs.webkit.org/show_bug.cgi?id=146343
+
+        Reviewed by Brent Fulgham.
+
+        * platform/network/curl/ResourceHandleManager.cpp:
+        (WebCore::calculateWebTimingInformations):
+        (WebCore::headerCallback):
+        (WebCore::ResourceHandleManager::initializeHandle):
+        (WebCore::ResourceHandleManager::initCookieSession):
+        (WebCore::sockoptfunction): Deleted.
+
 2015-06-26  Chris Fleizach  <cfleizach@apple.com>
 
         iOS speech synthesizer should expose names
index 9dd105d..8bcbdf2 100644 (file)
@@ -171,30 +171,17 @@ static void calculateWebTimingInformations(ResourceHandleInternal* d)
     curl_easy_getinfo(d->m_handle, CURLINFO_STARTTRANSFER_TIME, &startTransfertTime);
     curl_easy_getinfo(d->m_handle, CURLINFO_PRETRANSFER_TIME, &preTransferTime);
 
-    d->m_response.resourceLoadTiming()->dnsStart = 0;
-    d->m_response.resourceLoadTiming()->dnsEnd = static_cast<int>(dnslookupTime * 1000);
+    d->m_response.resourceLoadTiming().domainLookupStart = 0;
+    d->m_response.resourceLoadTiming().domainLookupEnd = static_cast<int>(dnslookupTime * 1000);
 
-    d->m_response.resourceLoadTiming()->connectStart = static_cast<int>(dnslookupTime * 1000);
-    d->m_response.resourceLoadTiming()->connectEnd = static_cast<int>(connectTime * 1000);
+    d->m_response.resourceLoadTiming().connectStart = static_cast<int>(dnslookupTime * 1000);
+    d->m_response.resourceLoadTiming().connectEnd = static_cast<int>(connectTime * 1000);
 
-    d->m_response.resourceLoadTiming()->sendStart = static_cast<int>(connectTime *1000);
-    d->m_response.resourceLoadTiming()->sendEnd =static_cast<int>(preTransferTime * 1000);
+    d->m_response.resourceLoadTiming().requestStart = static_cast<int>(connectTime *1000);
+    d->m_response.resourceLoadTiming().responseStart =static_cast<int>(preTransferTime * 1000);
 
-    if (appConnectTime) {
-        d->m_response.resourceLoadTiming()->sslStart = static_cast<int>(connectTime * 1000);
-        d->m_response.resourceLoadTiming()->sslEnd = static_cast<int>(appConnectTime *1000);
-    }
-}
-
-static int sockoptfunction(void* data, curl_socket_t /*curlfd*/, curlsocktype /*purpose*/)
-{
-    ResourceHandle* job = static_cast<ResourceHandle*>(data);
-    ResourceHandleInternal* d = job->getInternal();
-
-    if (d->m_response.resourceLoadTiming())
-        d->m_response.resourceLoadTiming()->requestTime = monotonicallyIncreasingTime();
-
-    return 0;
+    if (appConnectTime)
+        d->m_response.resourceLoadTiming().secureConnectionStart = static_cast<int>(connectTime * 1000);
 }
 #endif
 
@@ -518,11 +505,6 @@ static size_t headerCallback(char* ptr, size_t size, size_t nmemb, void* data)
                 d->m_multipartHandle = std::make_unique<MultipartHandle>(job, boundary);
         }
 
-#if ENABLE(WEB_TIMING)
-        if (d->m_response.resourceLoadTiming() && d->m_response.resourceLoadTiming()->requestTime)
-            d->m_response.resourceLoadTiming()->receiveHeadersEnd = milisecondsSinceRequest(d->m_response.resourceLoadTiming()->requestTime);
-#endif
-
         // HTTP redirection
         if (isHttpRedirect(httpCode)) {
             String location = d->m_response.httpHeaderField(HTTPHeaderName::Location);
@@ -1149,11 +1131,6 @@ void ResourceHandleManager::initializeHandle(ResourceHandle* job)
         curl_easy_setopt(d->m_handle, CURLOPT_PROXY, m_proxy.utf8().data());
         curl_easy_setopt(d->m_handle, CURLOPT_PROXYTYPE, m_proxyType);
     }
-#if ENABLE(WEB_TIMING)
-    curl_easy_setopt(d->m_handle, CURLOPT_SOCKOPTFUNCTION, sockoptfunction);
-    curl_easy_setopt(d->m_handle, CURLOPT_SOCKOPTDATA, job);
-    d->m_response.setResourceLoadTiming(ResourceLoadTiming::create());
-#endif
 }
 
 void ResourceHandleManager::initCookieSession()