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

Side by Side Diff: net/socket/ssl_client_socket.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/socket/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 std::vector<std::string> server_protos_with_commas; 70 std::vector<std::string> server_protos_with_commas;
71 for (size_t i = 0; i < protos_len; ) { 71 for (size_t i = 0; i < protos_len; ) {
72 const size_t len = protos[i]; 72 const size_t len = protos[i];
73 std::string proto_str(&protos[i + 1], len); 73 std::string proto_str(&protos[i + 1], len);
74 server_protos_with_commas.push_back(proto_str); 74 server_protos_with_commas.push_back(proto_str);
75 i += len + 1; 75 i += len + 1;
76 } 76 }
77 return JoinString(server_protos_with_commas, ','); 77 return JoinString(server_protos_with_commas, ',');
78 } 78 }
79 79
80 bool SSLClientSocket::WasNpnNegotiated() const {
81 return was_npn_negotiated_;
82 }
83
80 NextProto SSLClientSocket::GetNegotiatedProtocol() const { 84 NextProto SSLClientSocket::GetNegotiatedProtocol() const {
81 return protocol_negotiated_; 85 return protocol_negotiated_;
82 } 86 }
83 87
84 bool SSLClientSocket::IgnoreCertError(int error, int load_flags) { 88 bool SSLClientSocket::IgnoreCertError(int error, int load_flags) {
85 if (error == OK || load_flags & LOAD_IGNORE_ALL_CERT_ERRORS) 89 if (error == OK || load_flags & LOAD_IGNORE_ALL_CERT_ERRORS)
86 return true; 90 return true;
87 91
88 if (error == ERR_CERT_COMMON_NAME_INVALID && 92 if (error == ERR_CERT_COMMON_NAME_INVALID &&
89 (load_flags & LOAD_IGNORE_CERT_COMMON_NAME_INVALID)) 93 (load_flags & LOAD_IGNORE_CERT_COMMON_NAME_INVALID))
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 126
123 bool SSLClientSocket::WasChannelIDSent() const { 127 bool SSLClientSocket::WasChannelIDSent() const {
124 return channel_id_sent_; 128 return channel_id_sent_;
125 } 129 }
126 130
127 void SSLClientSocket::set_channel_id_sent(bool channel_id_sent) { 131 void SSLClientSocket::set_channel_id_sent(bool channel_id_sent) {
128 channel_id_sent_ = channel_id_sent; 132 channel_id_sent_ = channel_id_sent;
129 } 133 }
130 134
131 } // namespace net 135 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698