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

Unified Diff: net/http/http_stream_factory.cc

Issue 665083009: ABANDONED Handle multiple AlternateProtocols for each HostPortPair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: net/http/http_stream_factory.cc
diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc
index e86d8f89b071a9216854512694d174aaa85475a2..cdaf94f7d13034ec94fc4b3841eece7956fe552e 100644
--- a/net/http/http_stream_factory.cc
+++ b/net/http/http_stream_factory.cc
@@ -90,16 +90,8 @@ void HttpStreamFactory::ProcessAlternateProtocol(
if (mapping_rules)
mapping_rules->RewriteHost(&host_port);
- if (http_server_properties->HasAlternateProtocol(host_port)) {
- const AlternateProtocolInfo existing_alternate =
- http_server_properties->GetAlternateProtocol(host_port);
- // If we think the alternate protocol is broken, don't change it.
- if (existing_alternate.protocol == ALTERNATE_PROTOCOL_BROKEN)
- return;
- }
-
- http_server_properties->SetAlternateProtocol(host_port, port, protocol,
- probability);
+ http_server_properties->AddAlternateProtocol(
+ host_port, port, protocol, probability);
Ryan Hamilton 2014/11/03 19:00:30 Does this need to Clear() first? Otherwise it seem
Bence 2014/11/03 22:32:26 Previous behavior is that if an alternate protocol
Ryan Hamilton 2014/11/04 18:56:22 In the case of non-broken, the old code overwrite
Bence 2014/11/04 21:55:50 Done. FYI I had to create a new method in HttpSer
}
GURL HttpStreamFactory::ApplyHostMappingRules(const GURL& url,

Powered by Google App Engine
This is Rietveld 408576698