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 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 unclaimed_pushed_streams_.erase(it); | 1158 unclaimed_pushed_streams_.erase(it); |
1159 used_push_streams.Increment(); | 1159 used_push_streams.Increment(); |
1160 return stream; | 1160 return stream; |
1161 } | 1161 } |
1162 return NULL; | 1162 return NULL; |
1163 } | 1163 } |
1164 | 1164 |
1165 bool SpdySession::GetSSLInfo(SSLInfo* ssl_info, | 1165 bool SpdySession::GetSSLInfo(SSLInfo* ssl_info, |
1166 bool* was_npn_negotiated, | 1166 bool* was_npn_negotiated, |
1167 NextProto* protocol_negotiated) { | 1167 NextProto* protocol_negotiated) { |
1168 if (!is_secure_) { | 1168 |
1169 *protocol_negotiated = kProtoUnknown; | 1169 *was_npn_negotiated = connection_->socket()->WasNpnNegotiated(); |
1170 return false; | 1170 *protocol_negotiated = connection_->socket()->GetNegotiatedProtocol(); |
1171 } | 1171 return connection_->socket()->GetSSLInfo(ssl_info); |
1172 SSLClientSocket* ssl_socket = GetSSLClientSocket(); | |
1173 ssl_socket->GetSSLInfo(ssl_info); | |
1174 *was_npn_negotiated = ssl_socket->was_npn_negotiated(); | |
1175 *protocol_negotiated = ssl_socket->GetNegotiatedProtocol(); | |
1176 return true; | |
1177 } | 1172 } |
1178 | 1173 |
1179 bool SpdySession::GetSSLCertRequestInfo( | 1174 bool SpdySession::GetSSLCertRequestInfo( |
1180 SSLCertRequestInfo* cert_request_info) { | 1175 SSLCertRequestInfo* cert_request_info) { |
1181 if (!is_secure_) | 1176 if (!is_secure_) |
1182 return false; | 1177 return false; |
1183 GetSSLClientSocket()->GetSSLCertRequestInfo(cert_request_info); | 1178 GetSSLClientSocket()->GetSSLCertRequestInfo(cert_request_info); |
1184 return true; | 1179 return true; |
1185 } | 1180 } |
1186 | 1181 |
(...skipping 668 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 |