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

Unified Diff: net/http/http_stream_factory_impl_job_controller.cc

Issue 2821463002: Disable HTTP/2 Alternative Services. (Closed)
Patch Set: Fix //jingle/glue/. Created 3 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
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/spdy/spdy_test_util_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ec3827716e372fb5e2cbb3acd66e36433f4114aa..a48549074e8720b583b83e430d35e8916130f823 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -950,6 +950,13 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceFor(
}
UMA_HISTOGRAM_ENUMERATION("Net.AlternativeServiceTypeForRequest", type,
MAX_ALTERNATIVE_SERVICE_TYPE);
+
+ // TODO(bnc): https://crbug.com/615413 Re-enable HTTP/2 Alternative Services.
+ if (alternative_service.protocol == kProtoHTTP2 &&
+ !session_->params().enable_http2_alternative_service) {
+ return AlternativeService();
+ }
Ryan Hamilton 2017/04/13 21:53:45 I don't understand why we want to move this here i
Bence 2017/04/14 01:10:16 Sure. If it's in GetAlternativeServiceForInternal
Ryan Hamilton 2017/04/14 02:49:13 In that case, perhaps we need a new histogram for
Bence 2017/04/17 11:29:46 Oops, I wasn't aware of that, sorry. Let me just
+
return alternative_service;
}
@@ -988,7 +995,6 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceForInternal(
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
// idea already, but with Alternate-Protocol, it provides the ability for a
@@ -1002,12 +1008,6 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceForInternal(
continue;
if (alternative_service.protocol == kProtoHTTP2) {
- 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 == kProtoUnknown)
first_alternative_service = alternative_service;
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/spdy/spdy_test_util_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698