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..78e5498a0f4c675da316461ff1f8b156f6d36ae7 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,16 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() { |
if (ShouldForceQuic()) |
using_quic_ = true; |
- if (proxy_info_.is_quic()) |
+ if (using_quic_) |
+ DCHECK(session_->params().enable_quic); |
bengr
2015/02/11 23:57:28
Release builds won't have this statement.
tbansal1
2015/02/12 02:27:22
I believe that's WAI.
bengr
2015/02/12 17:14:46
That can't be the case. In a release build, the co
tbansal1
2015/02/13 17:10:39
Fixed.
|
+ |
+ if (proxy_info_.is_quic()) { |
using_quic_ = true; |
+ using_quic_proxy_ = true; |
+ DCHECK(session_->params().enable_quic_for_proxies); |
bengr
2015/02/11 23:57:28
Release builds won't have this statement.
tbansal1
2015/02/12 02:27:22
I believe that's WAI.
tbansal1
2015/02/13 17:10:39
This is still okay.
|
+ } |
if (using_quic_) { |
- DCHECK(session_->params().enable_quic); |
if (proxy_info_.is_quic() && !request_info_.url.SchemeIs("http")) { |
NOTREACHED(); |
// TODO(rch): support QUIC proxies for HTTPS urls. |