diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 17:22:28 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 17:22:28 +0000 |
commit | 6e11f1dc5bf61f7c1167ee5f8c2d846742b9ae3d (patch) | |
tree | 413da09e5bd8f5a95d67b92b2f49a3747b877d52 /net | |
parent | 665e2b7b8351b2ce82b7279325f65876df8f5283 (diff) | |
download | chromium_src-6e11f1dc5bf61f7c1167ee5f8c2d846742b9ae3d.zip chromium_src-6e11f1dc5bf61f7c1167ee5f8c2d846742b9ae3d.tar.gz chromium_src-6e11f1dc5bf61f7c1167ee5f8c2d846742b9ae3d.tar.bz2 |
Expose a spdy session's pooled aliases in the net-internals page.
BUG=106225
Review URL: https://chromiumcodereview.appspot.com/9696045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/spdy/spdy_session.cc | 9 | ||||
-rw-r--r-- | net/spdy/spdy_session_pool.cc | 7 |
2 files changed, 15 insertions, 1 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index 87c7011..8a57d92 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -1112,6 +1112,15 @@ Value* SpdySession::GetInfoAsValue() const { dict->SetInteger("source_id", net_log_.source().id); dict->SetString("host_port_pair", host_port_proxy_pair_.first.ToString()); + if (!pooled_aliases_.empty()) { + ListValue* alias_list = new ListValue(); + for (std::set<HostPortProxyPair>::const_iterator it = + pooled_aliases_.begin(); + it != pooled_aliases_.end(); it++) { + alias_list->Append(Value::CreateStringValue(it->first.ToString())); + } + dict->Set("aliases", alias_list); + } dict->SetString("proxy", host_port_proxy_pair_.second.ToURI()); dict->SetInteger("active_streams", active_streams_.size()); diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc index 4b86f4b9..fbfc3c4 100644 --- a/net/spdy/spdy_session_pool.cc +++ b/net/spdy/spdy_session_pool.cc @@ -222,7 +222,12 @@ Value* SpdySessionPool::SpdySessionPoolInfoToValue() const { SpdySessionList* sessions = it->second; for (SpdySessionList::const_iterator session = sessions->begin(); session != sessions->end(); ++session) { - list->Append(session->get()->GetInfoAsValue()); + // Only add the session if the key in the map matches the main + // host_port_proxy_pair (not an alias). + const HostPortProxyPair& key = it->first; + const HostPortProxyPair& pair = session->get()->host_port_proxy_pair(); + if (key.first.Equals(pair.first) && key.second == pair.second) + list->Append(session->get()->GetInfoAsValue()); } } return list; |