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/bind.h" | 10 #include "base/bind.h" |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 unclaimed_pushed_streams_.erase(it); | 1159 unclaimed_pushed_streams_.erase(it); |
1160 used_push_streams.Increment(); | 1160 used_push_streams.Increment(); |
1161 return stream; | 1161 return stream; |
1162 } | 1162 } |
1163 return NULL; | 1163 return NULL; |
1164 } | 1164 } |
1165 | 1165 |
1166 bool SpdySession::GetSSLInfo(SSLInfo* ssl_info, | 1166 bool SpdySession::GetSSLInfo(SSLInfo* ssl_info, |
1167 bool* was_npn_negotiated, | 1167 bool* was_npn_negotiated, |
1168 NextProto* protocol_negotiated) { | 1168 NextProto* protocol_negotiated) { |
1169 if (!is_secure_) { | 1169 |
1170 *protocol_negotiated = kProtoUnknown; | 1170 *was_npn_negotiated = connection_->socket()->WasNpnNegotiated(); |
1171 return false; | 1171 *protocol_negotiated = connection_->socket()->GetNegotiatedProtocol(); |
1172 } | 1172 return connection_->socket()->GetSSLInfo(ssl_info); |
1173 SSLClientSocket* ssl_socket = GetSSLClientSocket(); | |
1174 ssl_socket->GetSSLInfo(ssl_info); | |
1175 *was_npn_negotiated = ssl_socket->was_npn_negotiated(); | |
1176 *protocol_negotiated = ssl_socket->GetNegotiatedProtocol(); | |
1177 return true; | |
1178 } | 1173 } |
1179 | 1174 |
1180 bool SpdySession::GetSSLCertRequestInfo( | 1175 bool SpdySession::GetSSLCertRequestInfo( |
1181 SSLCertRequestInfo* cert_request_info) { | 1176 SSLCertRequestInfo* cert_request_info) { |
1182 if (!is_secure_) | 1177 if (!is_secure_) |
1183 return false; | 1178 return false; |
1184 GetSSLClientSocket()->GetSSLCertRequestInfo(cert_request_info); | 1179 GetSSLClientSocket()->GetSSLCertRequestInfo(cert_request_info); |
1185 return true; | 1180 return true; |
1186 } | 1181 } |
1187 | 1182 |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1855 SSLClientSocket* SpdySession::GetSSLClientSocket() const { | 1850 SSLClientSocket* SpdySession::GetSSLClientSocket() const { |
1856 if (!is_secure_) | 1851 if (!is_secure_) |
1857 return NULL; | 1852 return NULL; |
1858 SSLClientSocket* ssl_socket = | 1853 SSLClientSocket* ssl_socket = |
1859 reinterpret_cast<SSLClientSocket*>(connection_->socket()); | 1854 reinterpret_cast<SSLClientSocket*>(connection_->socket()); |
1860 DCHECK(ssl_socket); | 1855 DCHECK(ssl_socket); |
1861 return ssl_socket; | 1856 return ssl_socket; |
1862 } | 1857 } |
1863 | 1858 |
1864 } // namespace net | 1859 } // namespace net |
OLD | NEW |