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 was_origin_bound_cert_sent_(false) { |
14 } | 15 } |
15 | 16 |
16 SSLClientSocket::NextProto SSLClientSocket::NextProtoFromString( | 17 SSLClientSocket::NextProto SSLClientSocket::NextProtoFromString( |
17 const std::string& proto_string) { | 18 const std::string& proto_string) { |
18 if (proto_string == "http1.1" || proto_string == "http/1.1") { | 19 if (proto_string == "http1.1" || proto_string == "http/1.1") { |
19 return kProtoHTTP11; | 20 return kProtoHTTP11; |
20 } else if (proto_string == "spdy/1") { | 21 } else if (proto_string == "spdy/1") { |
21 return kProtoSPDY1; | 22 return kProtoSPDY1; |
22 } else if (proto_string == "spdy/2") { | 23 } else if (proto_string == "spdy/2") { |
23 return kProtoSPDY2; | 24 return kProtoSPDY2; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } | 84 } |
84 | 85 |
85 bool SSLClientSocket::was_spdy_negotiated() const { | 86 bool SSLClientSocket::was_spdy_negotiated() const { |
86 return was_spdy_negotiated_; | 87 return was_spdy_negotiated_; |
87 } | 88 } |
88 | 89 |
89 bool SSLClientSocket::set_was_spdy_negotiated(bool negotiated) { | 90 bool SSLClientSocket::set_was_spdy_negotiated(bool negotiated) { |
90 return was_spdy_negotiated_ = negotiated; | 91 return was_spdy_negotiated_ = negotiated; |
91 } | 92 } |
92 | 93 |
| 94 bool SSLClientSocket::was_origin_bound_cert_sent() const { |
| 95 return was_origin_bound_cert_sent_; |
| 96 } |
| 97 |
| 98 bool SSLClientSocket::set_was_origin_bound_cert_sent(bool sent) { |
| 99 return was_origin_bound_cert_sent_ = sent; |
| 100 } |
| 101 |
93 } // namespace net | 102 } // namespace net |
OLD | NEW |