summaryrefslogtreecommitdiffstats
path: root/net/websockets/websocket_job.cc
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-08 04:29:59 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-08 04:29:59 +0000
commit04644d4599c4e3a5696cbf3feed3aaaae7ea99e9 (patch)
tree97171a1d44648a8ef2447fd360af233e6acbb1b9 /net/websockets/websocket_job.cc
parent27ec8b6653c97bf5ba26549b484cbaf878d40ccf (diff)
downloadchromium_src-04644d4599c4e3a5696cbf3feed3aaaae7ea99e9.zip
chromium_src-04644d4599c4e3a5696cbf3feed3aaaae7ea99e9.tar.gz
chromium_src-04644d4599c4e3a5696cbf3feed3aaaae7ea99e9.tar.bz2
[SPDY] Make SpdySessionPool keep track of available sessions
Split a SpdySessionPool's sessions into available ones and unavailable ones. Keep all sessions in a set, and all the available sessions in a map keyed by SpdySessionKey. This is in preparation for making SpdySessionPool own a session even if it receives a GOAWAY frame. Split SpdySessionPool::Remove() into two functions -- MakeSessionUnavailable() and RemoveUnavailableSession(). For now, sessions call them at the same time, but in the future RemoveUnavailableSession() may be called later than MakeSessionUnavailable() (for the GOAWAY case). Don't add a SpdySession to a pool if it encountered an error during initialization. Also, don't do some work in SpdySession::InitializeWithSocket() if initialization fails. Rename functions and variables in SpdySessionPool to be concise and consistent. Inline a bunch of one-off functions. Rewrite the loop in SpdySessionPool::RemoveAliases(). BUG=255701 Review URL: https://chromiumcodereview.appspot.com/18600010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets/websocket_job.cc')
-rw-r--r--net/websockets/websocket_job.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc
index 301f0ae..34d4a25 100644
--- a/net/websockets/websocket_job.cc
+++ b/net/websockets/websocket_job.cc
@@ -597,7 +597,7 @@ int WebSocketJob::TrySpdyStream() {
// Forbid wss downgrade to SPDY without SSL.
// TODO(toyoshim): Does it realize the same policy with HTTP?
scoped_refptr<SpdySession> spdy_session =
- spdy_pool->GetIfExists(key, *socket_->net_log());
+ spdy_pool->FindAvailableSession(key, *socket_->net_log());
if (!spdy_session)
return OK;