summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session_pool.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-21 16:57:45 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-21 16:57:45 +0000
commit807c01ae2f590bc809312e9be809baa6ac38d5c7 (patch)
tree6fb7678efd51e4fe3db8a6df45b3c300188a3cb0 /net/spdy/spdy_session_pool.h
parentfd4d226549034acc7b249e0eff537089bd0cd6db (diff)
downloadchromium_src-807c01ae2f590bc809312e9be809baa6ac38d5c7.zip
chromium_src-807c01ae2f590bc809312e9be809baa6ac38d5c7.tar.gz
chromium_src-807c01ae2f590bc809312e9be809baa6ac38d5c7.tar.bz2
SPDY: Fix unittest-only leak.
We leaked the SpdySessionPool and SpdySession in the test since they have a circular reference. This is usually broken by a GOAWAY frame in real code, but we have to manually break the circular reference here. BUG=42084 Review URL: http://codereview.chromium.org/1695001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45198 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session_pool.h')
-rw-r--r--net/spdy/spdy_session_pool.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h
index db4ec42..3a77bc0 100644
--- a/net/spdy/spdy_session_pool.h
+++ b/net/spdy/spdy_session_pool.h
@@ -53,9 +53,11 @@ class SpdySessionPool : public base::RefCounted<SpdySessionPool> {
// Close all Spdy Sessions; used for debugging.
void CloseAllSessions();
+ // Removes a SpdySession from the SpdySessionPool.
+ void Remove(const scoped_refptr<SpdySession>& session);
+
private:
friend class base::RefCounted<SpdySessionPool>;
- friend class SpdySession; // Needed for Remove().
friend class SpdySessionPoolPeer; // For testing.
typedef std::list<scoped_refptr<SpdySession> > SpdySessionList;
@@ -63,9 +65,6 @@ class SpdySessionPool : public base::RefCounted<SpdySessionPool> {
virtual ~SpdySessionPool();
- // Removes a SpdySession from the SpdySessionPool.
- void Remove(const scoped_refptr<SpdySession>& session);
-
// Helper functions for manipulating the lists.
SpdySessionList* AddSessionList(const HostPortPair& host_port_pair);
SpdySessionList* GetSessionList(const HostPortPair& host_port_pair);