diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 16:28:55 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 16:28:55 +0000 |
commit | cb54b3b24d1b9b5e1aaaaa28478da63c90857c5f (patch) | |
tree | da427579f19487e2a276aa3fc371d0fc6fa8a63e /net/spdy/spdy_session_pool.h | |
parent | 9310b2601bf040a5da92b6183c493ab0746bcd09 (diff) | |
download | chromium_src-cb54b3b24d1b9b5e1aaaaa28478da63c90857c5f.zip chromium_src-cb54b3b24d1b9b5e1aaaaa28478da63c90857c5f.tar.gz chromium_src-cb54b3b24d1b9b5e1aaaaa28478da63c90857c5f.tar.bz2 |
Fix leaky spdy sessions and remove suppression.
BUG=44738
TEST=heap checker no longer complains and tests still pass
Review URL: http://codereview.chromium.org/2477004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session_pool.h')
-rw-r--r-- | net/spdy/spdy_session_pool.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h index d7569ba..2a1cb7b 100644 --- a/net/spdy/spdy_session_pool.h +++ b/net/spdy/spdy_session_pool.h @@ -54,7 +54,7 @@ class SpdySessionPool : public base::RefCounted<SpdySessionPool> { bool HasSession(const HostPortPair& host_port_pair)const; // Close all Spdy Sessions; used for debugging. - void CloseAllSessions(); + void CloseAllSessions() { RemoveAllSessions(true); } // Removes a SpdySession from the SpdySessionPool. void Remove(const scoped_refptr<SpdySession>& session); @@ -62,6 +62,7 @@ class SpdySessionPool : public base::RefCounted<SpdySessionPool> { private: friend class base::RefCounted<SpdySessionPool>; friend class SpdySessionPoolPeer; // For testing. + friend class SpdyNetworkTransactionTest; // For testing. typedef std::list<scoped_refptr<SpdySession> > SpdySessionList; typedef std::map<HostPortPair, SpdySessionList*> SpdySessionsMap; @@ -74,6 +75,8 @@ class SpdySessionPool : public base::RefCounted<SpdySessionPool> { const SpdySessionList* GetSessionList( const HostPortPair& host_port_pair) const; void RemoveSessionList(const HostPortPair& host_port_pair); + void ClearSessions() { RemoveAllSessions(false); } + void RemoveAllSessions(bool close); // This is our weak session pool - one session per domain. SpdySessionsMap sessions_; |