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

Side by Side Diff: net/spdy/spdy_session_pool.cc

Issue 9696045: Expose a spdy session's pooled aliases in the net-internals page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix eroman's comments Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_session_pool.h" 5 #include "net/spdy/spdy_session_pool.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 216
217 Value* SpdySessionPool::SpdySessionPoolInfoToValue() const { 217 Value* SpdySessionPool::SpdySessionPoolInfoToValue() const {
218 ListValue* list = new ListValue(); 218 ListValue* list = new ListValue();
219 219
220 for (SpdySessionsMap::const_iterator it = sessions_.begin(); 220 for (SpdySessionsMap::const_iterator it = sessions_.begin();
221 it != sessions_.end(); ++it) { 221 it != sessions_.end(); ++it) {
222 SpdySessionList* sessions = it->second; 222 SpdySessionList* sessions = it->second;
223 for (SpdySessionList::const_iterator session = sessions->begin(); 223 for (SpdySessionList::const_iterator session = sessions->begin();
224 session != sessions->end(); ++session) { 224 session != sessions->end(); ++session) {
225 list->Append(session->get()->GetInfoAsValue()); 225 // Only add the session if the key in the map matches the main
226 // host_port_proxy_pair (not an alias).
227 const HostPortProxyPair& key = it->first;
228 const HostPortProxyPair& pair = session->get()->host_port_proxy_pair();
229 if (key.first.Equals(pair.first) && key.second == pair.second)
230 list->Append(session->get()->GetInfoAsValue());
226 } 231 }
227 } 232 }
228 return list; 233 return list;
229 } 234 }
230 235
231 void SpdySessionPool::OnIPAddressChanged() { 236 void SpdySessionPool::OnIPAddressChanged() {
232 CloseCurrentSessions(); 237 CloseCurrentSessions();
233 http_server_properties_->ClearSpdySettings(); 238 http_server_properties_->ClearSpdySettings();
234 } 239 }
235 240
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 const scoped_refptr<SpdySession>& session = *session_it; 454 const scoped_refptr<SpdySession>& session = *session_it;
450 CHECK(session); 455 CHECK(session);
451 if (!session->is_active()) { 456 if (!session->is_active()) {
452 session->CloseSessionOnError( 457 session->CloseSessionOnError(
453 net::ERR_ABORTED, true, "Closing idle sessions."); 458 net::ERR_ABORTED, true, "Closing idle sessions.");
454 } 459 }
455 } 460 }
456 } 461 }
457 462
458 } // namespace net 463 } // namespace net
OLDNEW
« chrome/browser/resources/net_internals/spdy_view.js ('K') | « net/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698