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

Unified Diff: net/spdy/spdy_session_pool.cc

Issue 2739183005: Correctly log IP pooling in SpdySessionPool. (Closed)
Patch Set: Add link to bug in comment. Created 3 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 | « no previous file | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_pool.cc
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index ec932488b11970b8ba1c4b23a7bada3ff23c5da0..308a80b1e7175cefa941b7c3f2b4a7f55df6f586 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -162,15 +162,25 @@ base::WeakPtr<SpdySession> SpdySessionPool::FindAvailableSession(
AvailableSessionMap::iterator it = LookupAvailableSessionByKey(key);
if (it != available_sessions_.end()) {
- UMA_HISTOGRAM_ENUMERATION(
- "Net.SpdySessionGet", FOUND_EXISTING, SPDY_SESSION_GET_MAX);
- net_log.AddEvent(
- NetLogEventType::HTTP2_SESSION_POOL_FOUND_EXISTING_SESSION,
- it->second->net_log().source().ToEventParametersCallback());
+ if (key.Equals(it->second->spdy_session_key())) {
+ UMA_HISTOGRAM_ENUMERATION("Net.SpdySessionGet", FOUND_EXISTING,
+ SPDY_SESSION_GET_MAX);
+ net_log.AddEvent(
+ NetLogEventType::HTTP2_SESSION_POOL_FOUND_EXISTING_SESSION,
+ it->second->net_log().source().ToEventParametersCallback());
+ } else {
+ UMA_HISTOGRAM_ENUMERATION("Net.SpdySessionGet",
+ FOUND_EXISTING_FROM_IP_POOL,
+ SPDY_SESSION_GET_MAX);
+ net_log.AddEvent(
+ NetLogEventType::
+ HTTP2_SESSION_POOL_FOUND_EXISTING_SESSION_FROM_IP_POOL,
+ it->second->net_log().source().ToEventParametersCallback());
+ }
return it->second;
}
- // Look up the key's from the resolver's cache.
+ // Look up IP addresses from resolver cache.
HostResolver::RequestInfo resolve_info(key.host_port_pair());
AddressList addresses;
int rv = resolver_->ResolveFromCache(resolve_info, &addresses, net_log);
@@ -282,7 +292,7 @@ void SpdySessionPool::RegisterUnclaimedPushedStream(
GURL url,
base::WeakPtr<SpdySession> spdy_session) {
DCHECK(!url.is_empty());
- // This SpdySessionPool must own |spdy_session|.
+ // This SpdySessionPool must own |spdy_session|.
DCHECK(base::ContainsKey(sessions_, spdy_session.get()));
UnclaimedPushedStreamMap::iterator url_it =
unclaimed_pushed_streams_.lower_bound(url);
« no previous file with comments | « no previous file | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698