Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: net/http/http_response_info.cc

Issue 2808010: Add field trial stats for alternate_protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_response_info.h ('k') | net/url_request/url_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_info.cc
===================================================================
--- net/http/http_response_info.cc (revision 50874)
+++ net/http/http_response_info.cc (working copy)
@@ -47,6 +47,10 @@
// This bit is set if the request was fetched via an explicit proxy.
RESPONSE_INFO_WAS_PROXY = 1 << 15,
+ // This bit is set if response could use alternate protocol. However, browser
+ // will ingore the alternate protocol if spdy is not enabled.
+ RESPONSE_INFO_WAS_ALTERNATE_PROTOCOL_AVAILABLE = 1 << 16,
+
// TODO(darin): Add other bits to indicate alternate request methods.
// For now, we don't support storing those.
};
@@ -55,6 +59,7 @@
: was_cached(false),
was_fetched_via_spdy(false),
was_npn_negotiated(false),
+ was_alternate_protocol_available(false),
was_fetched_via_proxy(false) {
}
@@ -119,6 +124,9 @@
was_npn_negotiated = (flags & RESPONSE_INFO_WAS_NPN) != 0;
+ was_alternate_protocol_available =
+ (flags & RESPONSE_INFO_WAS_ALTERNATE_PROTOCOL_AVAILABLE) != 0;
+
was_fetched_via_proxy = (flags & RESPONSE_INFO_WAS_PROXY) != 0;
*response_truncated = (flags & RESPONSE_INFO_TRUNCATED) ? true : false;
@@ -144,6 +152,8 @@
flags |= RESPONSE_INFO_WAS_SPDY;
if (was_npn_negotiated)
flags |= RESPONSE_INFO_WAS_NPN;
+ if (was_alternate_protocol_available)
+ flags |= RESPONSE_INFO_WAS_ALTERNATE_PROTOCOL_AVAILABLE;
if (was_fetched_via_proxy)
flags |= RESPONSE_INFO_WAS_PROXY;
« no previous file with comments | « net/http/http_response_info.h ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698