diff options
author | vsevik@chromium.org <vsevik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 10:17:27 +0000 |
---|---|---|
committer | vsevik@chromium.org <vsevik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 10:17:27 +0000 |
commit | 8aca1e713f0f6e2b27b6d113bf12d82617afc4f5 (patch) | |
tree | 40906c7e604c610b764ea1c92dac74bfb0beef69 /webkit/glue | |
parent | 6b9f0e1069c16bffbaa4fe4669f35aa37b1e300b (diff) | |
download | chromium_src-8aca1e713f0f6e2b27b6d113bf12d82617afc4f5.zip chromium_src-8aca1e713f0f6e2b27b6d113bf12d82617afc4f5.tar.gz chromium_src-8aca1e713f0f6e2b27b6d113bf12d82617afc4f5.tar.bz2 |
Pass null timing to webkit when no such data is available.
DumpRenderTree does not collect timing information and we should pass null timing value to WebKit in this case.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6823006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/weburlloader_impl.cc | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc index 96042dc..0152e1d 100644 --- a/webkit/glue/weburlloader_impl.cc +++ b/webkit/glue/weburlloader_impl.cc @@ -198,22 +198,24 @@ void PopulateURLResponse( response->setConnectionReused(info.connection_reused); response->setDownloadFilePath(FilePathToWebString(info.download_file_path)); - WebURLLoadTiming timing; - timing.initialize(); const ResourceLoadTimingInfo& 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); + if (!timing_info.base_time.is_null()) { + WebURLLoadTiming timing; + timing.initialize(); + 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); + } if (info.devtools_info.get()) { WebHTTPLoadInfo load_info; |