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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 1137073003: Add a new disable_insecure_quic finch parameter to disable insecure QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 5 years, 7 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 1867d6d38b341491923307d9afa62ab95faef108..2d8c6849cefc0b027bc3306b6774224c17b83b2a 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -197,12 +197,18 @@ AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceFor(
// QUIC, then remove the following two lines.
if (alternative_service.host != origin.host())
return kNoAlternativeService;
+
if (!session_->params().enable_quic)
return kNoAlternativeService;
if (session_->quic_stream_factory()->IsQuicDisabled(origin.port()))
return kNoAlternativeService;
+ if (session_->params().disable_insecure_quic &&
+ !original_url.SchemeIs("https")) {
+ return kNoAlternativeService;
+ }
+
return alternative_service;
}

Powered by Google App Engine
This is Rietveld 408576698