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

Unified Diff: net/http/http_stream_factory_impl_job_controller.cc

Issue 2089243002: Split enable_alternative_service_with_different_host flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: net/http/http_stream_factory_impl_job_controller.cc
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
index bd3f2e3bd7cdad801af6e1202c231e9f134b909f..7eb3764474c1f918af6047c5e3137d664a5e5831 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -726,9 +726,6 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceForInternal(
bool quic_advertised = false;
bool quic_all_broken = true;
- const bool enable_different_host =
- session_->params().enable_alternative_service_with_different_host;
-
// First Alt-Svc that is not marked as broken.
AlternativeService first_alternative_service;
@@ -743,8 +740,6 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceForInternal(
continue;
}
- if (origin.host() != alternative_service.host && !enable_different_host)
- continue;
// Some shared unix systems may have user home directories (like
// http://foo.com/~mike) which allow users to emit headers. This is a bad
@@ -763,9 +758,11 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceForInternal(
if (!HttpStreamFactory::spdy_enabled())
continue;
- // TODO(bnc): Re-enable when https://crbug.com/615413 is fixed.
- if (origin.host() != alternative_service.host)
+ if (origin.host() != alternative_service.host &&
+ !session_->params()
+ .enable_http2_alternative_service_with_different_host) {
continue;
+ }
// Cache this entry if we don't have a non-broken Alt-Svc yet.
if (first_alternative_service.protocol ==
@@ -775,6 +772,12 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceForInternal(
}
DCHECK_EQ(QUIC, alternative_service.protocol);
+ if (origin.host() != alternative_service.host &&
+ !session_->params()
+ .enable_quic_alternative_service_with_different_host) {
+ continue;
+ }
+
quic_all_broken = false;
if (!session_->params().enable_quic)
continue;

Powered by Google App Engine
This is Rietveld 408576698