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

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: Rebased 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
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 37ac77876ef265637ac7e6e1e7d78f324dbe84a3..a36b832fd9fdcc4417e3f6e79c2d9cd5b9d1ef8f 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -106,7 +106,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.
@@ -144,8 +144,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();
@@ -176,7 +176,8 @@ 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"))
@@ -243,6 +244,11 @@ AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceFor(
if (!session_->params().enable_quic)
continue;
+ if (stream_type == HttpStreamRequest::BIDIRECTIONAL_STREAM &&
+ session_->params().quic_disable_bidirectional_streams) {
+ continue;
+ }
+
if (session_->quic_stream_factory()->IsQuicDisabled(origin.port()))
continue;
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698