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

Unified Diff: net/http/http_network_transaction.cc

Issue 339663010: Add a probability to Alternate-Protocol support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: eliminate static initializer Created 6 years, 5 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_network_session.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
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 0a2c8c4c9fdcbba0913d185276ccf75d6565f7e4..f4df073b4bba5ad905631653d2cba46820c0daa7 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -79,17 +79,20 @@ void ProcessAlternateProtocol(
HttpNetworkSession* session,
const HttpResponseHeaders& headers,
const HostPortPair& http_host_port_pair) {
- std::string alternate_protocol_str;
-
- if (!headers.EnumerateHeader(NULL, kAlternateProtocolHeader,
- &alternate_protocol_str)) {
- // Header is not present.
+ if (!headers.HasHeader(kAlternateProtocolHeader))
return;
+
+ std::vector<std::string> alternate_protocol_values;
+ void* iter = NULL;
+ std::string alternate_protocol_str;
+ while (headers.EnumerateHeader(&iter, kAlternateProtocolHeader,
+ &alternate_protocol_str)) {
+ alternate_protocol_values.push_back(alternate_protocol_str);
}
session->http_stream_factory()->ProcessAlternateProtocol(
session->http_server_properties(),
- alternate_protocol_str,
+ alternate_protocol_values,
http_host_port_pair,
*session);
}
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698