summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 02:47:42 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 02:47:42 +0000
commit92a98df95fa1b552ec8d30f20a4aa568dfadddfa (patch)
tree7902f4e4b6e9b1741f022c365da09d1441a5bbca /webkit
parenta4766fb2ede9c22876a41cf388c4b280387bbe2b (diff)
downloadchromium_src-92a98df95fa1b552ec8d30f20a4aa568dfadddfa.zip
chromium_src-92a98df95fa1b552ec8d30f20a4aa568dfadddfa.tar.gz
chromium_src-92a98df95fa1b552ec8d30f20a4aa568dfadddfa.tar.bz2
Expose the HttpResponseInfo's ConnectionInfo in window.chrome.loadTimes()
Review URL: https://chromiumcodereview.appspot.com/12792010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204393 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/resource_loader_bridge.cc1
-rw-r--r--webkit/glue/resource_loader_bridge.h4
-rw-r--r--webkit/glue/weburlloader_impl.cc1
-rw-r--r--webkit/glue/weburlresponse_extradata_impl.cc3
-rw-r--r--webkit/glue/weburlresponse_extradata_impl.h11
5 files changed, 19 insertions, 1 deletions
diff --git a/webkit/glue/resource_loader_bridge.cc b/webkit/glue/resource_loader_bridge.cc
index 23de004..f3b89b3 100644
--- a/webkit/glue/resource_loader_bridge.cc
+++ b/webkit/glue/resource_loader_bridge.cc
@@ -22,6 +22,7 @@ ResourceResponseInfo::ResourceResponseInfo()
was_fetched_via_spdy(false),
was_npn_negotiated(false),
was_alternate_protocol_available(false),
+ connection_info(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN),
was_fetched_via_proxy(false) {
}
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index 3389394..5f1aee6 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -32,6 +32,7 @@
#include "net/base/host_port_pair.h"
#include "net/base/load_timing_info.h"
#include "net/base/request_priority.h"
+#include "net/http/http_response_info.h"
#include "net/url_request/url_request_status.h"
#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
@@ -127,6 +128,9 @@ struct ResourceResponseInfo {
// ignore the alternate protocol when spdy is not enabled on browser side.
bool was_alternate_protocol_available;
+ // Information about the type of connection used to fetch this response.
+ net::HttpResponseInfo::ConnectionInfo connection_info;
+
// True if the response was fetched via an explicit proxy (as opposed to a
// transparent proxy). The proxy could be any type of proxy, HTTP or SOCKS.
// Note: we cannot tell if a transparent proxy may have been involved.
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 579bdca..9ed2b8c 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -211,6 +211,7 @@ void PopulateURLResponse(
extra_data->set_was_npn_negotiated(info.was_npn_negotiated);
extra_data->set_was_alternate_protocol_available(
info.was_alternate_protocol_available);
+ extra_data->set_connection_info(info.connection_info);
extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy);
// If there's no received headers end time, don't set load timing. This is
diff --git a/webkit/glue/weburlresponse_extradata_impl.cc b/webkit/glue/weburlresponse_extradata_impl.cc
index 59e43ff..4063662 100644
--- a/webkit/glue/weburlresponse_extradata_impl.cc
+++ b/webkit/glue/weburlresponse_extradata_impl.cc
@@ -9,7 +9,8 @@ namespace webkit_glue {
WebURLResponseExtraDataImpl::WebURLResponseExtraDataImpl(
const std::string& npn_negotiated_protocol)
: npn_negotiated_protocol_(npn_negotiated_protocol),
- is_ftp_directory_listing_(false) {
+ is_ftp_directory_listing_(false),
+ connection_info_(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN) {
}
WebURLResponseExtraDataImpl::~WebURLResponseExtraDataImpl() {
diff --git a/webkit/glue/weburlresponse_extradata_impl.h b/webkit/glue/weburlresponse_extradata_impl.h
index 84b63e8..a5ddba0 100644
--- a/webkit/glue/weburlresponse_extradata_impl.h
+++ b/webkit/glue/weburlresponse_extradata_impl.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "net/http/http_response_info.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "webkit/glue/webkit_glue_export.h"
@@ -44,6 +45,15 @@ class WEBKIT_GLUE_EXPORT WebURLResponseExtraDataImpl :
was_fetched_via_spdy_ = was_fetched_via_spdy;
}
+ // Information about the type of connection used to fetch this response.
+ net::HttpResponseInfo::ConnectionInfo connection_info() const {
+ return connection_info_;
+ }
+ void set_connection_info(
+ net::HttpResponseInfo::ConnectionInfo connection_info) {
+ connection_info_ = connection_info;
+ }
+
// Flag whether this request was loaded after the
// TLS/Next-Protocol-Negotiation was used.
// This is related to SPDY.
@@ -75,6 +85,7 @@ class WEBKIT_GLUE_EXPORT WebURLResponseExtraDataImpl :
bool was_fetched_via_proxy_;
bool was_fetched_via_spdy_;
bool was_npn_negotiated_;
+ net::HttpResponseInfo::ConnectionInfo connection_info_;
bool was_alternate_protocol_available_;
DISALLOW_COPY_AND_ASSIGN(WebURLResponseExtraDataImpl);