diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 12:17:16 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 12:17:16 +0000 |
commit | 2fd5a178fe8e1d5c87e8a598a579ed71388229df (patch) | |
tree | 8c674d34f355d564dc540ff663d16a4e140c5b5e /webkit/glue/weburlloader_impl.cc | |
parent | 6e17bb92de55577af86410a1e9709df91ec9617b (diff) | |
download | chromium_src-2fd5a178fe8e1d5c87e8a598a579ed71388229df.zip chromium_src-2fd5a178fe8e1d5c87e8a598a579ed71388229df.tar.gz chromium_src-2fd5a178fe8e1d5c87e8a598a579ed71388229df.tar.bz2 |
DevTools: provide network log details to the WebCore's InspectorController.
Review URL: http://codereview.chromium.org/2645006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/weburlloader_impl.cc')
-rw-r--r-- | webkit/glue/weburlloader_impl.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc index 3fb0206..bf776f6 100644 --- a/webkit/glue/weburlloader_impl.cc +++ b/webkit/glue/weburlloader_impl.cc @@ -20,6 +20,7 @@ #include "third_party/WebKit/WebKit/chromium/public/WebSecurityPolicy.h" #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/WebKit/chromium/public/WebURLLoadTiming.h" #include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" @@ -38,6 +39,7 @@ using WebKit::WebSecurityPolicy; using WebKit::WebString; using WebKit::WebURL; using WebKit::WebURLError; +using WebKit::WebURLLoadTiming; using WebKit::WebURLLoader; using WebKit::WebURLLoaderClient; using WebKit::WebURLRequest; @@ -170,11 +172,30 @@ void PopulateURLResponse( response->setSecurityInfo(info.security_info); response->setAppCacheID(info.appcache_id); response->setAppCacheManifestURL(info.appcache_manifest_url); + response->setWasCached(info.request_time > info.response_time); response->setWasFetchedViaSPDY(info.was_fetched_via_spdy); response->setWasNpnNegotiated(info.was_npn_negotiated); response->setWasAlternateProtocolAvailable( info.was_alternate_protocol_available); response->setWasFetchedViaProxy(info.was_fetched_via_proxy); + response->setConnectionID(info.connection_id); + + WebURLLoadTiming timing; + timing.initialize(); + const ResourceLoaderBridge::LoadTimingInfo& timing_info = info.load_timing; + timing.setRequestTime(timing_info.base_time.ToDoubleT()); + timing.setProxyStart(timing_info.proxy_start); + timing.setProxyEnd(timing_info.proxy_end); + timing.setDNSStart(timing_info.dns_start); + timing.setDNSEnd(timing_info.dns_end); + timing.setConnectStart(timing_info.connect_start); + timing.setConnectEnd(timing_info.connect_end); + timing.setSSLStart(timing_info.ssl_start); + timing.setSSLEnd(timing_info.ssl_end); + timing.setSendStart(timing_info.send_start); + timing.setSendEnd(timing_info.send_end); + timing.setReceiveHeadersEnd(timing_info.receive_headers_end); + response->setLoadTiming(timing); const net::HttpResponseHeaders* headers = info.headers; if (!headers) @@ -331,6 +352,8 @@ void WebURLLoaderImpl::Context::Start( if (request.reportUploadProgress()) load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS; + if (request.reportLoadTiming()) + load_flags |= net::LOAD_ENABLE_LOAD_TIMING; if (!request.allowCookies() || !request.allowStoredCredentials()) { load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; |