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

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: Rebase. Created 5 years, 11 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 f84b80c925399398725e6baa1335f75c1080444e..e1b7f87b69d3ba080eaa6de3db261ca3eb7f1a5f 100644
--- a/net/http/http_stream_factory.cc
+++ b/net/http/http_stream_factory.cc
@@ -86,16 +86,9 @@ 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.is_broken)
- return;
- }
-
- http_server_properties->SetAlternateProtocol(
- host_port, static_cast<uint16>(port), protocol, probability);
+ http_server_properties->ClearNonBrokenAlternateProtocols(host_port);
+ http_server_properties->AddAlternateProtocol(host_port, port, protocol,
+ probability);
}
GURL HttpStreamFactory::ApplyHostMappingRules(const GURL& url,

Powered by Google App Engine
This is Rietveld 408576698