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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 1878143005: SHP 4: Change AlternativeServiceMap to use SchemeHostPort as the key. No change to Pref data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SHP_3
Patch Set: fix cronet && SpdyNetworkTransactionUnittests Created 4 years, 8 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_impl.cc
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index d160c317468afb4e434d2b64dc23791d5402d682..614f65319567173719b444a676391ae5c18526c9 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -183,7 +183,7 @@ AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceFor(
if (original_url.SchemeIs("ftp"))
return AlternativeService();
- HostPortPair origin = HostPortPair::FromURL(original_url);
+ url::SchemeHostPort origin(original_url);
HttpServerProperties& http_server_properties =
*session_->http_server_properties();
const AlternativeServiceVector alternative_service_vector =
@@ -226,7 +226,6 @@ AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceFor(
origin.port() < kUnrestrictedPort))
continue;
- origin.set_port(alternative_service.port);
if (alternative_service.protocol >= NPN_SPDY_MINIMUM_VERSION &&
alternative_service.protocol <= NPN_SPDY_MAXIMUM_VERSION) {
if (!HttpStreamFactory::spdy_enabled())
@@ -252,7 +251,8 @@ AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceFor(
continue;
}
- if (session_->quic_stream_factory()->IsQuicDisabled(origin.port()))
+ if (session_->quic_stream_factory()->IsQuicDisabled(
+ alternative_service.port))
continue;
if (!original_url.SchemeIs("https"))

Powered by Google App Engine
This is Rietveld 408576698