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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 138283005: Enable QUIC proxies to be used for HTTP URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: QUIC proxies should be secure Created 6 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 | « no previous file | net/quic/quic_network_transaction_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 a68b21ff1e4ba18340cd5a34b1be0ae0140b1601..40e2771eb9edae45d9576683427a84133660175e 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -675,7 +675,7 @@ int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) {
if (result == OK) {
// Remove unsupported proxies from the list.
proxy_info_.RemoveProxiesWithoutScheme(
- ProxyServer::SCHEME_DIRECT |
+ ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_QUIC |
ProxyServer::SCHEME_HTTP | ProxyServer::SCHEME_HTTPS |
ProxyServer::SCHEME_SOCKS4 | ProxyServer::SCHEME_SOCKS5);
@@ -743,18 +743,25 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() {
if (ShouldForceQuic())
using_quic_ = true;
+ if (proxy_info_.is_quic())
+ using_quic_ = true;
+
if (using_quic_) {
DCHECK(session_->params().enable_quic);
- if (!proxy_info_.is_direct()) {
+ if (proxy_info_.is_quic() && !request_info_.url.SchemeIs("http")) {
NOTREACHED();
- // TODO(rch): support QUIC proxies.
+ // TODO(rch): support QUIC proxies for HTTPS urls.
return ERR_NOT_IMPLEMENTED;
}
+ HostPortProxyPair destination;
+ destination.first = proxy_info_.is_quic() ?
+ proxy_info_.proxy_server().host_port_pair() : origin_;
+ destination.second = ProxyServer::Direct();
next_state_ = STATE_INIT_CONNECTION_COMPLETE;
- const ProxyServer& proxy_server = proxy_info_.proxy_server();
- int rv = quic_request_.Request(HostPortProxyPair(origin_, proxy_server),
- using_ssl_, session_->cert_verifier(),
- net_log_, io_callback_);
+ bool secure_quic = using_ssl_ || proxy_info_.is_quic();
+ int rv = quic_request_.Request(
+ destination, secure_quic, session_->cert_verifier(), net_log_,
+ io_callback_);
if (rv != OK) {
// OK, there's no available QUIC session. Let |waiting_job_| resume
// if it's paused.
« no previous file with comments | « no previous file | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698