summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-16 08:25:41 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-16 08:25:41 +0000
commite25e955817c9d6b9356e815d9f0c9948669fce95 (patch)
tree72708e6be5e60ee9c18568a3a5f099cad9fb11a0 /webkit/glue
parent7cae2ab87cabee2f80d55fcb5062014138d2cf60 (diff)
downloadchromium_src-e25e955817c9d6b9356e815d9f0c9948669fce95.zip
chromium_src-e25e955817c9d6b9356e815d9f0c9948669fce95.tar.gz
chromium_src-e25e955817c9d6b9356e815d9f0c9948669fce95.tar.bz2
DevTools & WebTiming : Migrate from PassiveLogCollector to dedicated LoadTimingObserver.
Review URL: http://codereview.chromium.org/2909016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/resource_loader_bridge.cc1
-rw-r--r--webkit/glue/resource_loader_bridge.h3
-rw-r--r--webkit/glue/weburlloader_impl.cc4
3 files changed, 7 insertions, 1 deletions
diff --git a/webkit/glue/resource_loader_bridge.cc b/webkit/glue/resource_loader_bridge.cc
index cee2b6e..8845256 100644
--- a/webkit/glue/resource_loader_bridge.cc
+++ b/webkit/glue/resource_loader_bridge.cc
@@ -45,6 +45,7 @@ ResourceLoaderBridge::ResponseInfo::ResponseInfo() {
was_fetched_via_spdy = false;
was_npn_negotiated = false;
connection_id = 0;
+ connection_reused = false;
was_alternate_protocol_available = false;
was_fetched_via_proxy = false;
}
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index 73bbe4d..e66181f5ec 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -184,6 +184,9 @@ class ResourceLoaderBridge {
// is no associated connection, contains 0.
uint32 connection_id;
+ // Determines whether physical connection reused.
+ bool connection_reused;
+
// Detailed timing information used by the WebTiming, HAR and Developer
// Tools.
LoadTimingInfo load_timing;
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 8a09562..f235734 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -173,13 +173,15 @@ 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->setWasCached(!info.load_timing.base_time.is_null() &&
+ info.response_time < info.load_timing.base_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);
+ response->setConnectionReused(info.connection_reused);
WebURLLoadTiming timing;
timing.initialize();