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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 903213003: Enable QUIC for proxies based on Finch config and command line switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 5 years, 10 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_network_session.cc ('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_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index d6e299e71d9cbe2927c6929a78a4f2bb4009cba9..b2cec9fd3afdb2f15542432140e57c990625518f 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -671,10 +671,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 +752,14 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() {
if (ShouldForceQuic())
using_quic_ = true;
- if (proxy_info_.is_quic())
+ DCHECK(!using_quic_ || session_->params().enable_quic);
+
+ if (proxy_info_.is_quic()) {
using_quic_ = true;
+ DCHECK(session_->params().enable_quic_for_proxies);
+ }
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.
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698