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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 1796253002: Add an option to disable net::BidirectionalStreamQuicImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 28fa8aa57c29814275666e1824debdb88f3a32ff..4c76133b9eef824425deeee9acb24505dd89343b 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -110,7 +110,7 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
request->AttachJob(job);
const AlternativeService alternative_service =
- GetAlternativeServiceFor(request_info, delegate);
+ GetAlternativeServiceFor(request_info, delegate, stream_type);
if (alternative_service.protocol != UNINITIALIZED_ALTERNATE_PROTOCOL) {
// Never share connection with other jobs for FTP requests.
@@ -148,8 +148,8 @@ void HttpStreamFactoryImpl::PreconnectStreams(
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config) {
DCHECK(!for_websockets_);
- AlternativeService alternative_service =
- GetAlternativeServiceFor(request_info, nullptr);
+ AlternativeService alternative_service = GetAlternativeServiceFor(
+ request_info, nullptr, HttpStreamRequest::HTTP_STREAM);
HostPortPair server;
if (alternative_service.protocol != UNINITIALIZED_ALTERNATE_PROTOCOL) {
server = alternative_service.host_port_pair();
@@ -180,12 +180,18 @@ const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const {
AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceFor(
const HttpRequestInfo& request_info,
- HttpStreamRequest::Delegate* delegate) {
+ HttpStreamRequest::Delegate* delegate,
+ HttpStreamRequest::StreamType stream_type) {
GURL original_url = request_info.url;
if (original_url.SchemeIs("ftp"))
return AlternativeService();
+ if (stream_type == HttpStreamRequest::BIDIRECTIONAL_STREAM &&
+ session_->params().disable_bidirectional_stream_quic_impl) {
+ return AlternativeService();
+ }
+
HostPortPair origin = HostPortPair::FromURL(original_url);
HttpServerProperties& http_server_properties =
*session_->http_server_properties();

Powered by Google App Engine
This is Rietveld 408576698