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

Unified Diff: net/http/http_network_transaction.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 | « chrome/renderer/render_view.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
===================================================================
--- net/http/http_network_transaction.cc (revision 50874)
+++ net/http/http_network_transaction.cc (working copy)
@@ -155,11 +155,6 @@
void ProcessAlternateProtocol(const HttpResponseHeaders& headers,
const HostPortPair& http_host_port_pair,
HttpAlternateProtocols* alternate_protocols) {
- if (!g_next_protos || g_next_protos->empty()) {
- // This implies that NPN is not supported. We don't currently support any
- // alternate protocols that don't use NPN.
- return;
- }
std::string alternate_protocol_str;
if (!headers.EnumerateHeader(NULL, HttpAlternateProtocols::kHeader,
@@ -763,10 +758,11 @@
curr_endpoint_url = &alternate_endpoint_url;
}
- if (alternate_protocol_mode_ == kUnspecified) {
- const HttpAlternateProtocols& alternate_protocols =
- session_->alternate_protocols();
- if (alternate_protocols.HasAlternateProtocolFor(endpoint_)) {
+ const HttpAlternateProtocols& alternate_protocols =
+ session_->alternate_protocols();
+ if (alternate_protocols.HasAlternateProtocolFor(endpoint_)) {
+ response_.was_alternate_protocol_available = true;
+ if (alternate_protocol_mode_ == kUnspecified) {
HttpAlternateProtocols::PortProtocolPair alternate =
alternate_protocols.GetAlternateProtocolFor(endpoint_);
if (alternate.protocol != HttpAlternateProtocols::BROKEN) {
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698