Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1636)

Unified Diff: net/spdy/spdy_session.h

Issue 9861032: Close idle connections / SPDY sessions when needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/transport_client_socket_pool.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.h
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 091d1a26a265cff5d0c27e297a4acb58d223c101..2fbfd1e20a81b01074deeb5e273320d65ad60b4e 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -50,7 +50,8 @@ class SpdyStream;
class SSLInfo;
class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
- public BufferedSpdyFramerVisitorInterface {
+ public BufferedSpdyFramerVisitorInterface,
+ public LayeredPool {
public:
// Create a new SpdySession.
// |host_port_proxy_pair| is the host/port that this session connects to, and
@@ -268,6 +269,9 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
int GetProtocolVersion() const;
+ // LayeredPool implementation.
+ virtual bool CloseOneIdleConnection() OVERRIDE;
+
private:
friend class base::RefCounted<SpdySession>;
@@ -275,9 +279,11 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy2Test, Ping);
FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy2Test, FailedPing);
FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy2Test, GetActivePushStream);
+ FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy2Test, CloseOneIdleConnection);
FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy3Test, Ping);
FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy3Test, FailedPing);
FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy3Test, GetActivePushStream);
+ FRIEND_TEST_ALL_PREFIXES(SpdySessionSpdy3Test, CloseOneIdleConnection);
struct PendingCreateStream {
PendingCreateStream(const GURL& url, RequestPriority priority,
« no previous file with comments | « net/socket/transport_client_socket_pool.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698