summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authorlzheng@chromium.org <lzheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-26 03:57:57 +0000
committerlzheng@chromium.org <lzheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-26 03:57:57 +0000
commit193b0b89b4b49f8e8eb985b8f1a16e3c8506ee66 (patch)
tree5c7fe26f96ac2654fbb9e47e6b54b2e1d6faa29a /net/url_request
parente22fbfc7ddc9e6539d734f6d976f54eeca5111ec (diff)
downloadchromium_src-193b0b89b4b49f8e8eb985b8f1a16e3c8506ee66.zip
chromium_src-193b0b89b4b49f8e8eb985b8f1a16e3c8506ee66.tar.gz
chromium_src-193b0b89b4b49f8e8eb985b8f1a16e3c8506ee66.tar.bz2
Add field trial stats for alternate_protocol. The histogram we collected are:
http stats when alternate protocol is available but npn was not negotiated ( which means not usng spdy), and when alternate is available AND spdy is used. Noticable changes: 1. In http_network_transaction.cc, changed the logic that always parse response from server for alternate protocol and remember that in HttpAlternateProtocols strucuture. We need to remember this to collect stats for servers with alternate protocol support but used http for. 2. In spdy_stream.cc, get rid of the response copy from spdy_stream. This copy overwrites some early status in response set in http_network_transaction. TEST=http_network_transaction_unittest.cc BUG=46689 Review URL: http://codereview.chromium.org/2808010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50927 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/url_request.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index aff01c7..f770c89 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -371,7 +371,8 @@ class URLRequest {
// Indicate if this response was fetched from disk cache.
bool was_cached() const { return response_info_.was_cached; }
- // Returns true if the URLRequest was delivered with SPDY.
+ // True if response could use alternate protocol. However, browser will
+ // ingore the alternate protocol if spdy is not enabled.
bool was_fetched_via_spdy() const {
return response_info_.was_fetched_via_spdy;
}
@@ -382,6 +383,12 @@ class URLRequest {
return response_info_.was_npn_negotiated;
}
+ // Returns true if the URLRequest was delivered when the alertnate protocol
+ // is available.
+ bool was_alternate_protocol_available() const {
+ return response_info_.was_alternate_protocol_available;
+ }
+
// Returns true if the URLRequest was delivered through a proxy.
bool was_fetched_via_proxy() const {
return response_info_.was_fetched_via_proxy;