diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 20:49:02 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 20:49:02 +0000 |
commit | 4a5e1780401366315132683fa5079c6690e50156 (patch) | |
tree | 10d6a63b7b52345bcc58dba71a7c8bcf697de003 /net/spdy/spdy_session_pool.h | |
parent | 2539acbc3e92658bd4a6178896de85650e18860b (diff) | |
download | chromium_src-4a5e1780401366315132683fa5079c6690e50156.zip chromium_src-4a5e1780401366315132683fa5079c6690e50156.tar.gz chromium_src-4a5e1780401366315132683fa5079c6690e50156.tar.bz2 |
Add command line option for changing the max number of SPDY sessions per
domain. The default remains at 1.
Command line usage to set it to 13:
chrome.exe --use-spdy --max-spdy-sessions-per-domain=13
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/669169
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session_pool.h')
-rw-r--r-- | net/spdy/spdy_session_pool.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h index 8cf8c60..8c50577 100644 --- a/net/spdy/spdy_session_pool.h +++ b/net/spdy/spdy_session_pool.h @@ -47,6 +47,12 @@ class SpdySessionPool : public base::RefCounted<SpdySessionPool> { scoped_refptr<SpdySession> Get( const HostPortPair& host_port_pair, HttpNetworkSession* session); + // Set the maximum concurrent sessions per domain. + static void set_max_sessions_per_domain(int max) { + if (max >= 1) + g_max_sessions_per_domain = max; + } + // Builds a SpdySession from an existing SSL socket. Users should try // calling Get() first to use an existing SpdySession so we don't get // multiple SpdySessions per domain. Note that ownership of |connection| is @@ -86,6 +92,8 @@ class SpdySessionPool : public base::RefCounted<SpdySessionPool> { // This is our weak session pool - one session per domain. SpdySessionsMap sessions_; + static int g_max_sessions_per_domain; + DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); }; |