diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 00:15:21 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 00:15:21 +0000 |
commit | 367ead44729ca97c8ed94365b0fe5e24de54fd4f (patch) | |
tree | aa89fb816ddc75519802c65357d41c0a49537747 /net/spdy/spdy_session.cc | |
parent | d77ca3edc4b240592b94d3287047386b3ab5470c (diff) | |
download | chromium_src-367ead44729ca97c8ed94365b0fe5e24de54fd4f.zip chromium_src-367ead44729ca97c8ed94365b0fe5e24de54fd4f.tar.gz chromium_src-367ead44729ca97c8ed94365b0fe5e24de54fd4f.tar.bz2 |
Fix SpdySessionPool to take a host port pair instead of just the host.
BUG=28595
Review URL: http://codereview.chromium.org/660107
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.cc')
-rw-r--r-- | net/spdy/spdy_session.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index e8b3238..172b5d7 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -182,7 +182,8 @@ void AdjustSocketBufferSizes(ClientSocket* socket) { // static bool SpdySession::use_ssl_ = true; -SpdySession::SpdySession(const std::string& host, HttpNetworkSession* session) +SpdySession::SpdySession(const HostPortPair& host_port_pair, + HttpNetworkSession* session) : ALLOW_THIS_IN_INITIALIZER_LIST( connect_callback_(this, &SpdySession::OnTCPConnect)), ALLOW_THIS_IN_INITIALIZER_LIST( @@ -191,7 +192,7 @@ SpdySession::SpdySession(const std::string& host, HttpNetworkSession* session) read_callback_(this, &SpdySession::OnReadComplete)), ALLOW_THIS_IN_INITIALIZER_LIST( write_callback_(this, &SpdySession::OnWriteComplete)), - domain_(host), + host_port_pair_(host_port_pair), session_(session), connection_(new ClientSocketHandle), read_buffer_(new IOBuffer(kReadBufferSize)), @@ -222,9 +223,7 @@ SpdySession::~SpdySession() { connection_->socket()->Disconnect(); } - // TODO(willchan): Don't hardcode port 80 here. - DCHECK(!session_->spdy_session_pool()->HasSession( - HostResolver::RequestInfo(domain_, 80))); + DCHECK(!session_->spdy_session_pool()->HasSession(host_port_pair())); // Record per-session histograms here. UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdyStreamsPerSession", @@ -273,7 +272,7 @@ net::Error SpdySession::Connect(const std::string& group_name, spdy_sessions.Increment(); int rv = connection_->Init(group_name, host, priority, &connect_callback_, - session_->tcp_socket_pool(), load_log); + session_->tcp_socket_pool(), load_log); DCHECK(rv <= 0); // If the connect is pending, we still return ok. The APIs enqueue |