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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 10690122: Change SpdySession::GetSSLInfo to get the SSLInfo from the underlying socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actual working test Created 8 years, 5 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/bind.h" 10 #include "base/bind.h"
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698