| 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 <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1257 ssl_info->token_binding_key_param = data_->token_binding_key_param; | 1257 ssl_info->token_binding_key_param = data_->token_binding_key_param; |
| 1258 return true; | 1258 return true; |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 void MockSSLClientSocket::GetSSLCertRequestInfo( | 1261 void MockSSLClientSocket::GetSSLCertRequestInfo( |
| 1262 SSLCertRequestInfo* cert_request_info) { | 1262 SSLCertRequestInfo* cert_request_info) { |
| 1263 DCHECK(cert_request_info); | 1263 DCHECK(cert_request_info); |
| 1264 if (data_->cert_request_info) { | 1264 if (data_->cert_request_info) { |
| 1265 cert_request_info->host_and_port = | 1265 cert_request_info->host_and_port = |
| 1266 data_->cert_request_info->host_and_port; | 1266 data_->cert_request_info->host_and_port; |
| 1267 cert_request_info->client_certs = data_->cert_request_info->client_certs; | 1267 cert_request_info->is_proxy = data_->cert_request_info->is_proxy; |
| 1268 cert_request_info->cert_authorities = |
| 1269 data_->cert_request_info->cert_authorities; |
| 1270 cert_request_info->cert_key_types = |
| 1271 data_->cert_request_info->cert_key_types; |
| 1268 } else { | 1272 } else { |
| 1269 cert_request_info->Reset(); | 1273 cert_request_info->Reset(); |
| 1270 } | 1274 } |
| 1271 } | 1275 } |
| 1272 | 1276 |
| 1273 ChannelIDService* MockSSLClientSocket::GetChannelIDService() const { | 1277 ChannelIDService* MockSSLClientSocket::GetChannelIDService() const { |
| 1274 return data_->channel_id_service; | 1278 return data_->channel_id_service; |
| 1275 } | 1279 } |
| 1276 | 1280 |
| 1277 Error MockSSLClientSocket::GetTokenBindingSignature(crypto::ECPrivateKey* key, | 1281 Error MockSSLClientSocket::GetTokenBindingSignature(crypto::ECPrivateKey* key, |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1789 } | 1793 } |
| 1790 | 1794 |
| 1791 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { | 1795 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { |
| 1792 int64_t total = 0; | 1796 int64_t total = 0; |
| 1793 for (const MockWrite* write = writes; write != writes + writes_size; ++write) | 1797 for (const MockWrite* write = writes; write != writes + writes_size; ++write) |
| 1794 total += write->data_len; | 1798 total += write->data_len; |
| 1795 return total; | 1799 return total; |
| 1796 } | 1800 } |
| 1797 | 1801 |
| 1798 } // namespace net | 1802 } // namespace net |
| OLD | NEW |