diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-08 22:25:46 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-08 22:25:46 +0000 |
commit | 64ade3bced12c45802c82cfa065e90d6c5b5d575 (patch) | |
tree | 50255ad49a8e7ef9f375a7061c3829878975f99a /jingle | |
parent | dc2cad71ffdcf2799cf4bc450882c6d8c4d61efd (diff) | |
download | chromium_src-64ade3bced12c45802c82cfa065e90d6c5b5d575.zip chromium_src-64ade3bced12c45802c82cfa065e90d6c5b5d575.tar.gz chromium_src-64ade3bced12c45802c82cfa065e90d6c5b5d575.tar.bz2 |
Use 'https://' prefix for proxy resolution in ProxyResolvingClientSocket
This is because we use TLS on the socket for all current use cases.
BUG=159579
Review URL: https://chromiumcodereview.appspot.com/11364152
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166780 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle')
-rw-r--r-- | jingle/glue/proxy_resolving_client_socket.cc | 12 | ||||
-rw-r--r-- | jingle/glue/proxy_resolving_client_socket.h | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/jingle/glue/proxy_resolving_client_socket.cc b/jingle/glue/proxy_resolving_client_socket.cc index 839daf2..1ed235b 100644 --- a/jingle/glue/proxy_resolving_client_socket.cc +++ b/jingle/glue/proxy_resolving_client_socket.cc @@ -9,7 +9,6 @@ #include "base/bind_helpers.h" #include "base/compiler_specific.h" #include "base/logging.h" -#include "googleurl/src/gurl.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/http/http_network_session.h" @@ -34,6 +33,9 @@ ProxyResolvingClientSocket::ProxyResolvingClientSocket( ssl_config_(ssl_config), pac_request_(NULL), dest_host_port_pair_(dest_host_port_pair), + // Assume that we intend to do TLS on this socket; all + // current use cases do. + proxy_url_("https://" + dest_host_port_pair_.ToString()), tried_direct_connect_fallback_(false), bound_net_log_( net::BoundNetLog::Make( @@ -46,6 +48,7 @@ ProxyResolvingClientSocket::ProxyResolvingClientSocket( DCHECK(request_context); DCHECK(!dest_host_port_pair_.host().empty()); DCHECK_GT(dest_host_port_pair_.port(), 0); + DCHECK(proxy_url_.is_valid()); net::HttpNetworkSession::Params session_params; session_params.client_socket_factory = socket_factory; @@ -125,10 +128,8 @@ int ProxyResolvingClientSocket::Connect( tried_direct_connect_fallback_ = false; // First we try and resolve the proxy. - GURL url("http://" + dest_host_port_pair_.ToString()); - DCHECK(url.is_valid()); int status = network_session_->proxy_service()->ResolveProxy( - url, + proxy_url_, &proxy_info_, proxy_resolve_callback_, &pac_request_, @@ -267,9 +268,8 @@ int ProxyResolvingClientSocket::ReconsiderProxyAfterError(int error) { proxy_info_.proxy_server().host_port_pair().ToString()); } - GURL url("http://" + dest_host_port_pair_.ToString()); int rv = network_session_->proxy_service()->ReconsiderProxyAfterError( - url, &proxy_info_, proxy_resolve_callback_, &pac_request_, + proxy_url_, &proxy_info_, proxy_resolve_callback_, &pac_request_, bound_net_log_); if (rv == net::OK || rv == net::ERR_IO_PENDING) { CloseTransportSocket(); diff --git a/jingle/glue/proxy_resolving_client_socket.h b/jingle/glue/proxy_resolving_client_socket.h index 99f342c..eb1e4de 100644 --- a/jingle/glue/proxy_resolving_client_socket.h +++ b/jingle/glue/proxy_resolving_client_socket.h @@ -12,6 +12,7 @@ #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" +#include "googleurl/src/gurl.h" #include "net/base/completion_callback.h" #include "net/base/host_port_pair.h" #include "net/base/net_errors.h" @@ -92,7 +93,8 @@ class ProxyResolvingClientSocket : public net::StreamSocket { const net::SSLConfig ssl_config_; net::ProxyService::PacRequest* pac_request_; net::ProxyInfo proxy_info_; - net::HostPortPair dest_host_port_pair_; + const net::HostPortPair dest_host_port_pair_; + const GURL proxy_url_; bool tried_direct_connect_fallback_; net::BoundNetLog bound_net_log_; base::WeakPtrFactory<ProxyResolvingClientSocket> weak_factory_; |