summaryrefslogtreecommitdiffstats
path: root/net/socket_stream
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-15 22:54:10 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-15 22:54:10 +0000
commit930cc74958f742ff83f80d0c1798bfdbeb490daa (patch)
treebf8e3f78cb60e2f060489c8bce63ac952d0d5418 /net/socket_stream
parent5dabe432f517d15c2a478a568f12b3d6f1068eab (diff)
downloadchromium_src-930cc74958f742ff83f80d0c1798bfdbeb490daa.zip
chromium_src-930cc74958f742ff83f80d0c1798bfdbeb490daa.tar.gz
chromium_src-930cc74958f742ff83f80d0c1798bfdbeb490daa.tar.bz2
Change HostResolver::RequestInfo to take a HostPortPair rather than naked host string + port.
Review URL: http://codereview.chromium.org/3420001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59577 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket_stream')
-rw-r--r--net/socket_stream/socket_stream.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index 382571a..a36ca9b 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -509,18 +509,14 @@ int SocketStream::DoResolveHost() {
proxy_mode_ = kTunnelProxy;
// Determine the host and port to connect to.
- std::string host;
- int port;
+ HostPortPair host_port_pair;
if (proxy_mode_ != kDirectConnection) {
- HostPortPair host_port_pair = proxy_info_.proxy_server().host_port_pair();
- host = host_port_pair.host();
- port = host_port_pair.port();
+ host_port_pair = proxy_info_.proxy_server().host_port_pair();
} else {
- host = url_.HostNoBrackets();
- port = url_.EffectiveIntPort();
+ host_port_pair = HostPortPair::FromURL(url_);
}
- HostResolver::RequestInfo resolve_info(host, port);
+ HostResolver::RequestInfo resolve_info(host_port_pair);
DCHECK(host_resolver_.get());
resolver_.reset(new SingleRequestHostResolver(host_resolver_.get()));
@@ -768,8 +764,7 @@ int SocketStream::DoSOCKSConnect() {
next_state_ = STATE_SOCKS_CONNECT_COMPLETE;
ClientSocket* s = socket_.release();
- HostResolver::RequestInfo req_info(url_.HostNoBrackets(),
- url_.EffectiveIntPort());
+ HostResolver::RequestInfo req_info(HostPortPair::FromURL(url_));
DCHECK(!proxy_info_.is_empty());
if (proxy_info_.proxy_server().scheme() == ProxyServer::SCHEME_SOCKS5)