summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session_pool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/spdy/spdy_session_pool.cc')
-rw-r--r--net/spdy/spdy_session_pool.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 0f012fb..5cfd62c 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -12,6 +12,8 @@ namespace net {
// The maximum number of sessions to open to a single domain.
static const size_t kMaxSessionsPerDomain = 1;
+int SpdySessionPool::g_max_sessions_per_domain = kMaxSessionsPerDomain;
+
SpdySessionPool::SpdySessionPool() {}
SpdySessionPool::~SpdySessionPool() {
CloseAllSessions();
@@ -22,7 +24,7 @@ scoped_refptr<SpdySession> SpdySessionPool::Get(
scoped_refptr<SpdySession> spdy_session;
SpdySessionList* list = GetSessionList(host_port_pair);
if (list) {
- if (list->size() >= kMaxSessionsPerDomain) {
+ if (list->size() >= static_cast<unsigned int>(g_max_sessions_per_domain)) {
spdy_session = list->front();
list->pop_front();
}
@@ -36,7 +38,7 @@ scoped_refptr<SpdySession> SpdySessionPool::Get(
DCHECK(spdy_session);
list->push_back(spdy_session);
- DCHECK(list->size() <= kMaxSessionsPerDomain);
+ DCHECK_LE(list->size(), static_cast<unsigned int>(g_max_sessions_per_domain));
return spdy_session;
}