OLD | NEW |
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 Loading... |
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 if (!pooled_aliases_.empty()) { |
| 1136 ListValue* alias_list = new ListValue(); |
| 1137 for (std::set<HostPortProxyPair>::const_iterator it = |
| 1138 pooled_aliases_.begin(); |
| 1139 it != pooled_aliases_.end(); it++) { |
| 1140 alias_list->Append(Value::CreateStringValue(it->first.ToString())); |
| 1141 } |
| 1142 dict->Set("aliases", alias_list); |
| 1143 } |
1135 dict->SetString("proxy", host_port_proxy_pair_.second.ToURI()); | 1144 dict->SetString("proxy", host_port_proxy_pair_.second.ToURI()); |
1136 | 1145 |
1137 dict->SetInteger("active_streams", active_streams_.size()); | 1146 dict->SetInteger("active_streams", active_streams_.size()); |
1138 | 1147 |
1139 dict->SetInteger("unclaimed_pushed_streams", | 1148 dict->SetInteger("unclaimed_pushed_streams", |
1140 unclaimed_pushed_streams_.size()); | 1149 unclaimed_pushed_streams_.size()); |
1141 | 1150 |
1142 dict->SetBoolean("is_secure", is_secure_); | 1151 dict->SetBoolean("is_secure", is_secure_); |
1143 | 1152 |
1144 SSLClientSocket::NextProto proto = SSLClientSocket::kProtoUnknown; | 1153 SSLClientSocket::NextProto proto = SSLClientSocket::kProtoUnknown; |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1945 SSLClientSocket* SpdySession::GetSSLClientSocket() const { | 1954 SSLClientSocket* SpdySession::GetSSLClientSocket() const { |
1946 if (!is_secure_) | 1955 if (!is_secure_) |
1947 return NULL; | 1956 return NULL; |
1948 SSLClientSocket* ssl_socket = | 1957 SSLClientSocket* ssl_socket = |
1949 reinterpret_cast<SSLClientSocket*>(connection_->socket()); | 1958 reinterpret_cast<SSLClientSocket*>(connection_->socket()); |
1950 DCHECK(ssl_socket); | 1959 DCHECK(ssl_socket); |
1951 return ssl_socket; | 1960 return ssl_socket; |
1952 } | 1961 } |
1953 | 1962 |
1954 } // namespace net | 1963 } // namespace net |
OLD | NEW |