Chromium Code Reviews| 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(); |
|
Ryan Hamilton
2016/03/15 22:41:45
This also disable non-QUIC based AlternativeServic
xunjieli
2016/03/16 15:47:04
Done.
|
| + } |
| + |
| HostPortPair origin = HostPortPair::FromURL(original_url); |
| HttpServerProperties& http_server_properties = |
| *session_->http_server_properties(); |