| Index: net/spdy/spdy_session_pool.cc
|
| diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
|
| index 308a80b1e7175cefa941b7c3f2b4a7f55df6f586..7850b4f564159466573c99a8681577476354afc2 100644
|
| --- a/net/spdy/spdy_session_pool.cc
|
| +++ b/net/spdy/spdy_session_pool.cc
|
| @@ -130,6 +130,7 @@ base::WeakPtr<SpdySession> SpdySessionPool::CreateAvailableSessionFromSocket(
|
| base::WeakPtr<SpdySession> SpdySessionPool::FindAvailableSession(
|
| const SpdySessionKey& key,
|
| const GURL& url,
|
| + bool enable_ip_based_pooling,
|
| const NetLogWithSource& net_log) {
|
| UnclaimedPushedStreamMap::iterator url_it =
|
| unclaimed_pushed_streams_.find(url);
|
| @@ -169,6 +170,16 @@ base::WeakPtr<SpdySession> SpdySessionPool::FindAvailableSession(
|
| NetLogEventType::HTTP2_SESSION_POOL_FOUND_EXISTING_SESSION,
|
| it->second->net_log().source().ToEventParametersCallback());
|
| } else {
|
| + if (!enable_ip_based_pooling) {
|
| + // Remove session from available sessions and from aliases, and remove
|
| + // key from the session's pooled alias set, so that a new session can be
|
| + // created with this |key|.
|
| + it->second->RemovePooledAlias(key);
|
| + UnmapKey(key);
|
| + RemoveAliases(key);
|
| + return base::WeakPtr<SpdySession>();
|
| + }
|
| +
|
| UMA_HISTOGRAM_ENUMERATION("Net.SpdySessionGet",
|
| FOUND_EXISTING_FROM_IP_POOL,
|
| SPDY_SESSION_GET_MAX);
|
| @@ -180,6 +191,9 @@ base::WeakPtr<SpdySession> SpdySessionPool::FindAvailableSession(
|
| return it->second;
|
| }
|
|
|
| + if (!enable_ip_based_pooling)
|
| + return base::WeakPtr<SpdySession>();
|
| +
|
| // Look up IP addresses from resolver cache.
|
| HostResolver::RequestInfo resolve_info(key.host_port_pair());
|
| AddressList addresses;
|
|
|