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

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: FIx curvercp 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
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | remoting/jingle_glue/ssl_socket_adapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | remoting/jingle_glue/ssl_socket_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698