Chromium Code Reviews| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/linked_ptr.h" | 9 #include "base/memory/linked_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1103 dict->SetString("host_port_pair", host_port_proxy_pair_.first.ToString()); | 1103 dict->SetString("host_port_pair", host_port_proxy_pair_.first.ToString()); |
| 1104 dict->SetString("proxy", host_port_proxy_pair_.second.ToURI()); | 1104 dict->SetString("proxy", host_port_proxy_pair_.second.ToURI()); |
| 1105 | 1105 |
| 1106 dict->SetInteger("active_streams", active_streams_.size()); | 1106 dict->SetInteger("active_streams", active_streams_.size()); |
| 1107 | 1107 |
| 1108 dict->SetInteger("unclaimed_pushed_streams", | 1108 dict->SetInteger("unclaimed_pushed_streams", |
| 1109 unclaimed_pushed_streams_.size()); | 1109 unclaimed_pushed_streams_.size()); |
| 1110 | 1110 |
| 1111 dict->SetBoolean("is_secure", is_secure_); | 1111 dict->SetBoolean("is_secure", is_secure_); |
| 1112 | 1112 |
| 1113 SSLClientSocket::NextProto proto = SSLClientSocket::kProtoUnknown; | |
| 1114 if (is_secure_) { | |
| 1115 SSLClientSocket* ssl_socket = | |
| 1116 reinterpret_cast<SSLClientSocket*>(connection_->socket()); | |
|
eroman
2012/03/07 19:27:32
Are you absolutely sure about this? Reinterpret ca
mmenke
2012/03/07 19:32:32
Drive by comment: Looks like all the other instan
Ryan Hamilton
2012/03/07 19:46:22
Heh, yes I agree. This is already wrapped in an i
Ryan Hamilton
2012/03/07 19:46:22
eroman: yes in the sense that we do this repeatedl
mmenke
2012/03/07 19:47:59
Oops...Indeed it is. Amusingly, I just looked at
| |
| 1117 DCHECK(ssl_socket); | |
| 1118 proto = ssl_socket->protocol_negotiated(); | |
| 1119 } | |
| 1120 dict->SetString("protocol_negotiated", | |
| 1121 SSLClientSocket::NextProtoToString(proto)); | |
| 1122 | |
| 1113 dict->SetInteger("error", error_); | 1123 dict->SetInteger("error", error_); |
| 1114 dict->SetInteger("max_concurrent_streams", max_concurrent_streams_); | 1124 dict->SetInteger("max_concurrent_streams", max_concurrent_streams_); |
| 1115 | 1125 |
| 1116 dict->SetInteger("streams_initiated_count", streams_initiated_count_); | 1126 dict->SetInteger("streams_initiated_count", streams_initiated_count_); |
| 1117 dict->SetInteger("streams_pushed_count", streams_pushed_count_); | 1127 dict->SetInteger("streams_pushed_count", streams_pushed_count_); |
| 1118 dict->SetInteger("streams_pushed_and_claimed_count", | 1128 dict->SetInteger("streams_pushed_and_claimed_count", |
| 1119 streams_pushed_and_claimed_count_); | 1129 streams_pushed_and_claimed_count_); |
| 1120 dict->SetInteger("streams_abandoned_count", streams_abandoned_count_); | 1130 dict->SetInteger("streams_abandoned_count", streams_abandoned_count_); |
| 1121 dict->SetInteger("frames_received", buffered_spdy_framer_.frames_received()); | 1131 dict->SetInteger("frames_received", buffered_spdy_framer_.frames_received()); |
| 1122 | 1132 |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1879 if (it == pending_callback_map_.end()) | 1889 if (it == pending_callback_map_.end()) |
| 1880 return; | 1890 return; |
| 1881 | 1891 |
| 1882 CompletionCallback callback = it->second.callback; | 1892 CompletionCallback callback = it->second.callback; |
| 1883 int result = it->second.result; | 1893 int result = it->second.result; |
| 1884 pending_callback_map_.erase(it); | 1894 pending_callback_map_.erase(it); |
| 1885 callback.Run(result); | 1895 callback.Run(result); |
| 1886 } | 1896 } |
| 1887 | 1897 |
| 1888 } // namespace net | 1898 } // namespace net |
| OLD | NEW |