diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 00:30:12 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 00:30:12 +0000 |
commit | 13eae8ce32b768450bdda9af60bd791491a5fd82 (patch) | |
tree | 81dfd2b600b24ead8afe9547b909333f4252df79 /net/spdy/spdy_session.h | |
parent | 1e721f5632a5eddfba9730f367f18d0befe0463d (diff) | |
download | chromium_src-13eae8ce32b768450bdda9af60bd791491a5fd82.zip chromium_src-13eae8ce32b768450bdda9af60bd791491a5fd82.tar.gz chromium_src-13eae8ce32b768450bdda9af60bd791491a5fd82.tar.bz2 |
Stop refcounting SpdySessionPool.
BUG=57343
TEST=none
Review URL: http://codereview.chromium.org/3602001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61015 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.h')
-rw-r--r-- | net/spdy/spdy_session.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h index 313440c..58a2710 100644 --- a/net/spdy/spdy_session.h +++ b/net/spdy/spdy_session.h @@ -51,6 +51,8 @@ class SpdySession : public base::RefCounted<SpdySession>, // Create a new SpdySession. // |host_port_proxy_pair| is the host/port that this session connects to, and // the proxy configuration settings that it's using. + // |spdy_session_pool| is the SpdySessionPool that owns us. Its lifetime must + // strictly be greater than |this|. // |session| is the HttpNetworkSession. |net_log| is the NetLog that we log // network events to. SpdySession(const HostPortProxyPair& host_port_proxy_pair, @@ -159,7 +161,9 @@ class SpdySession : public base::RefCounted<SpdySession>, return frames_received_ > 0; } - void set_in_session_pool(bool val) { in_session_pool_ = val; } + void set_spdy_session_pool(SpdySessionPool* pool) { + spdy_session_pool_ = NULL; + } // Access to the number of active and pending streams. These are primarily // available for testing and diagnostics. @@ -294,7 +298,9 @@ class SpdySession : public base::RefCounted<SpdySession>, // The domain this session is connected to. const HostPortProxyPair host_port_proxy_pair_; - scoped_refptr<SpdySessionPool> spdy_session_pool_; + // |spdy_session_pool_| owns us, therefore its lifetime must exceed ours. We + // set this to NULL after we are removed from the pool. + SpdySessionPool* spdy_session_pool_; SpdySettingsStorage* spdy_settings_; // The socket handle for this session. @@ -361,8 +367,6 @@ class SpdySession : public base::RefCounted<SpdySession>, bool received_settings_; // Did this session receive at least one settings // frame. - bool in_session_pool_; // True if the session is currently in the pool. - // Initial send window size for the session; can be changed by an // arriving SETTINGS frame; newly created streams use this value for the // initial send window size. |