OLD | NEW |
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/socket_test_util.h" | 5 #include "net/socket/socket_test_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 if (is_npn_state_set_) | 1159 if (is_npn_state_set_) |
1160 return new_npn_value_; | 1160 return new_npn_value_; |
1161 return data_->was_npn_negotiated; | 1161 return data_->was_npn_negotiated; |
1162 } | 1162 } |
1163 | 1163 |
1164 bool MockSSLClientSocket::set_was_npn_negotiated(bool negotiated) { | 1164 bool MockSSLClientSocket::set_was_npn_negotiated(bool negotiated) { |
1165 is_npn_state_set_ = true; | 1165 is_npn_state_set_ = true; |
1166 return new_npn_value_ = negotiated; | 1166 return new_npn_value_ = negotiated; |
1167 } | 1167 } |
1168 | 1168 |
1169 NextProto MockSSLClientSocket::protocol_negotiated() const { | 1169 NextProto MockSSLClientSocket::GetNegotiatedProtocol() const { |
1170 if (is_protocol_negotiated_set_) | 1170 if (is_protocol_negotiated_set_) |
1171 return protocol_negotiated_; | 1171 return protocol_negotiated_; |
1172 return data_->protocol_negotiated; | 1172 return data_->protocol_negotiated; |
1173 } | 1173 } |
1174 | 1174 |
1175 void MockSSLClientSocket::set_protocol_negotiated( | 1175 void MockSSLClientSocket::set_protocol_negotiated( |
1176 NextProto protocol_negotiated) { | 1176 NextProto protocol_negotiated) { |
1177 is_protocol_negotiated_set_ = true; | 1177 is_protocol_negotiated_set_ = true; |
1178 protocol_negotiated_ = protocol_negotiated; | 1178 protocol_negotiated_ = protocol_negotiated; |
1179 } | 1179 } |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1620 | 1620 |
1621 const char kSOCKS5OkRequest[] = | 1621 const char kSOCKS5OkRequest[] = |
1622 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 1622 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
1623 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 1623 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
1624 | 1624 |
1625 const char kSOCKS5OkResponse[] = | 1625 const char kSOCKS5OkResponse[] = |
1626 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 1626 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
1627 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 1627 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
1628 | 1628 |
1629 } // namespace net | 1629 } // namespace net |
OLD | NEW |