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

Side by Side Diff: net/spdy/spdy_session.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: 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.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 CloseAllStreams(err); 1125 CloseAllStreams(err);
1126 } 1126 }
1127 } 1127 }
1128 1128
1129 Value* SpdySession::GetInfoAsValue() const { 1129 Value* SpdySession::GetInfoAsValue() const {
1130 DictionaryValue* dict = new DictionaryValue(); 1130 DictionaryValue* dict = new DictionaryValue();
1131 1131
1132 dict->SetInteger("source_id", net_log_.source().id); 1132 dict->SetInteger("source_id", net_log_.source().id);
1133 1133
1134 dict->SetString("host_port_pair", host_port_proxy_pair_.first.ToString()); 1134 dict->SetString("host_port_pair", host_port_proxy_pair_.first.ToString());
1135 ListValue* alias_list = new ListValue();
1136 for (std::set<HostPortProxyPair>::const_iterator it = pooled_aliases_.begin();
1137 it != pooled_aliases_.end(); it++) {
1138 alias_list->Append(Value::CreateStringValue(it->first.ToString()));
1139 }
1140 dict->Set("aliases", alias_list);
eroman 2012/03/13 20:08:42 I suggest only setting the aliases property if the
Ryan Hamilton 2012/03/13 21:55:37 Done. (I had thought we would prefer the property
1135 dict->SetString("proxy", host_port_proxy_pair_.second.ToURI()); 1141 dict->SetString("proxy", host_port_proxy_pair_.second.ToURI());
1136 1142
1137 dict->SetInteger("active_streams", active_streams_.size()); 1143 dict->SetInteger("active_streams", active_streams_.size());
1138 1144
1139 dict->SetInteger("unclaimed_pushed_streams", 1145 dict->SetInteger("unclaimed_pushed_streams",
1140 unclaimed_pushed_streams_.size()); 1146 unclaimed_pushed_streams_.size());
1141 1147
1142 dict->SetBoolean("is_secure", is_secure_); 1148 dict->SetBoolean("is_secure", is_secure_);
1143 1149
1144 SSLClientSocket::NextProto proto = SSLClientSocket::kProtoUnknown; 1150 SSLClientSocket::NextProto proto = SSLClientSocket::kProtoUnknown;
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 SSLClientSocket* SpdySession::GetSSLClientSocket() const { 1951 SSLClientSocket* SpdySession::GetSSLClientSocket() const {
1946 if (!is_secure_) 1952 if (!is_secure_)
1947 return NULL; 1953 return NULL;
1948 SSLClientSocket* ssl_socket = 1954 SSLClientSocket* ssl_socket =
1949 reinterpret_cast<SSLClientSocket*>(connection_->socket()); 1955 reinterpret_cast<SSLClientSocket*>(connection_->socket());
1950 DCHECK(ssl_socket); 1956 DCHECK(ssl_socket);
1951 return ssl_socket; 1957 return ssl_socket;
1952 } 1958 }
1953 1959
1954 } // namespace net 1960 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698