Chromium Code Reviews| Index: net/http/http_stream_factory_impl_job.cc |
| diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc |
| index 8729dfbba293736b550fd70027c9852804520ffa..835dd12328e5f2627d06dffdc20bb80b8039fdac 100644 |
| --- a/net/http/http_stream_factory_impl_job.cc |
| +++ b/net/http/http_stream_factory_impl_job.cc |
| @@ -91,6 +91,7 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory, |
| using_ssl_(false), |
| using_spdy_(false), |
| using_quic_(false), |
| + using_quic_proxy_(false), |
| quic_request_(session_->quic_stream_factory()), |
| using_existing_quic_session_(false), |
| spdy_certificate_error_(OK), |
| @@ -671,10 +672,15 @@ int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) { |
| if (result == OK) { |
| // Remove unsupported proxies from the list. |
| - proxy_info_.RemoveProxiesWithoutScheme( |
| - ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_QUIC | |
| - ProxyServer::SCHEME_HTTP | ProxyServer::SCHEME_HTTPS | |
| - ProxyServer::SCHEME_SOCKS4 | ProxyServer::SCHEME_SOCKS5); |
| + int supported_proxies = |
| + ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP | |
| + ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 | |
| + ProxyServer::SCHEME_SOCKS5; |
| + |
| + if (session_->params().enable_quic_for_proxies) |
| + supported_proxies |= ProxyServer::SCHEME_QUIC; |
| + |
| + proxy_info_.RemoveProxiesWithoutScheme(supported_proxies); |
| if (proxy_info_.is_empty()) { |
| // No proxies/direct to choose from. This happens when we don't support |
| @@ -747,11 +753,18 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() { |
| if (ShouldForceQuic()) |
| using_quic_ = true; |
| - if (proxy_info_.is_quic()) |
| + if (using_quic_) |
| + DCHECK(session_->params().enable_quic); |
| + |
| + if (proxy_info_.is_quic()) { |
| using_quic_ = true; |
| + using_quic_proxy_ = true; |
| + } |
| if (using_quic_) { |
| - DCHECK(session_->params().enable_quic); |
| + if (using_quic_proxy_) |
| + DCHECK(session_->params().enable_quic_for_proxies); |
|
Ryan Hamilton
2015/02/11 00:20:32
Is this the only place using_quic_proxy_ is used?
tbansal1
2015/02/11 01:25:26
Done.
|
| + |
| if (proxy_info_.is_quic() && !request_info_.url.SchemeIs("http")) { |
| NOTREACHED(); |
| // TODO(rch): support QUIC proxies for HTTPS urls. |