OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
11 SSLClientSocket::SSLClientSocket() | 11 SSLClientSocket::SSLClientSocket() |
12 : was_npn_negotiated_(false), | 12 : was_npn_negotiated_(false), |
13 was_spdy_negotiated_(false), | 13 was_spdy_negotiated_(false), |
| 14 next_protocol_(kProtoUnknown), |
14 was_origin_bound_cert_sent_(false) { | 15 was_origin_bound_cert_sent_(false) { |
15 } | 16 } |
16 | 17 |
17 SSLClientSocket::NextProto SSLClientSocket::NextProtoFromString( | 18 SSLClientSocket::NextProto SSLClientSocket::NextProtoFromString( |
18 const std::string& proto_string) { | 19 const std::string& proto_string) { |
19 if (proto_string == "http1.1" || proto_string == "http/1.1") { | 20 if (proto_string == "http1.1" || proto_string == "http/1.1") { |
20 return kProtoHTTP11; | 21 return kProtoHTTP11; |
21 } else if (proto_string == "spdy/1") { | 22 } else if (proto_string == "spdy/1") { |
22 return kProtoSPDY1; | 23 return kProtoSPDY1; |
23 } else if (proto_string == "spdy/2") { | 24 } else if (proto_string == "spdy/2") { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 105 |
105 bool SSLClientSocket::was_origin_bound_cert_sent() const { | 106 bool SSLClientSocket::was_origin_bound_cert_sent() const { |
106 return was_origin_bound_cert_sent_; | 107 return was_origin_bound_cert_sent_; |
107 } | 108 } |
108 | 109 |
109 bool SSLClientSocket::set_was_origin_bound_cert_sent(bool sent) { | 110 bool SSLClientSocket::set_was_origin_bound_cert_sent(bool sent) { |
110 return was_origin_bound_cert_sent_ = sent; | 111 return was_origin_bound_cert_sent_ = sent; |
111 } | 112 } |
112 | 113 |
113 } // namespace net | 114 } // namespace net |
OLD | NEW |