OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 10 |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 SSLHostInfo* ssl_host_info, | 597 SSLHostInfo* ssl_host_info, |
598 CertVerifier* cert_verifier, | 598 CertVerifier* cert_verifier, |
599 DnsCertProvenanceChecker* dns_cert_checker) { | 599 DnsCertProvenanceChecker* dns_cert_checker) { |
600 MockSSLClientSocket* socket = | 600 MockSSLClientSocket* socket = |
601 new MockSSLClientSocket(transport_socket, host_and_port, ssl_config, | 601 new MockSSLClientSocket(transport_socket, host_and_port, ssl_config, |
602 ssl_host_info, mock_ssl_data_.GetNext()); | 602 ssl_host_info, mock_ssl_data_.GetNext()); |
603 ssl_client_sockets_.push_back(socket); | 603 ssl_client_sockets_.push_back(socket); |
604 return socket; | 604 return socket; |
605 } | 605 } |
606 | 606 |
| 607 void MockClientSocketFactory::ClearSSLSessionCache() { |
| 608 } |
| 609 |
607 MockClientSocket::MockClientSocket(net::NetLog* net_log) | 610 MockClientSocket::MockClientSocket(net::NetLog* net_log) |
608 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), | 611 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), |
609 connected_(false), | 612 connected_(false), |
610 net_log_(NetLog::Source(), net_log) { | 613 net_log_(NetLog::Source(), net_log) { |
611 } | 614 } |
612 | 615 |
613 bool MockClientSocket::SetReceiveBufferSize(int32 size) { | 616 bool MockClientSocket::SetReceiveBufferSize(int32 size) { |
614 return true; | 617 return true; |
615 } | 618 } |
616 | 619 |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 SSLHostInfo* ssl_host_info, | 1300 SSLHostInfo* ssl_host_info, |
1298 CertVerifier* cert_verifier, | 1301 CertVerifier* cert_verifier, |
1299 DnsCertProvenanceChecker* dns_cert_checker) { | 1302 DnsCertProvenanceChecker* dns_cert_checker) { |
1300 MockSSLClientSocket* socket = | 1303 MockSSLClientSocket* socket = |
1301 new MockSSLClientSocket(transport_socket, host_and_port, ssl_config, | 1304 new MockSSLClientSocket(transport_socket, host_and_port, ssl_config, |
1302 ssl_host_info, mock_ssl_data_.GetNext()); | 1305 ssl_host_info, mock_ssl_data_.GetNext()); |
1303 ssl_client_sockets_.push_back(socket); | 1306 ssl_client_sockets_.push_back(socket); |
1304 return socket; | 1307 return socket; |
1305 } | 1308 } |
1306 | 1309 |
| 1310 void DeterministicMockClientSocketFactory::ClearSSLSessionCache() { |
| 1311 } |
| 1312 |
1307 MockSOCKSClientSocketPool::MockSOCKSClientSocketPool( | 1313 MockSOCKSClientSocketPool::MockSOCKSClientSocketPool( |
1308 int max_sockets, | 1314 int max_sockets, |
1309 int max_sockets_per_group, | 1315 int max_sockets_per_group, |
1310 ClientSocketPoolHistograms* histograms, | 1316 ClientSocketPoolHistograms* histograms, |
1311 TCPClientSocketPool* tcp_pool) | 1317 TCPClientSocketPool* tcp_pool) |
1312 : SOCKSClientSocketPool(max_sockets, max_sockets_per_group, histograms, | 1318 : SOCKSClientSocketPool(max_sockets, max_sockets_per_group, histograms, |
1313 NULL, tcp_pool, NULL), | 1319 NULL, tcp_pool, NULL), |
1314 tcp_pool_(tcp_pool) { | 1320 tcp_pool_(tcp_pool) { |
1315 } | 1321 } |
1316 | 1322 |
(...skipping 28 matching lines...) Expand all Loading... |
1345 | 1351 |
1346 const char kSOCKS5OkRequest[] = | 1352 const char kSOCKS5OkRequest[] = |
1347 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 1353 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
1348 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 1354 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
1349 | 1355 |
1350 const char kSOCKS5OkResponse[] = | 1356 const char kSOCKS5OkResponse[] = |
1351 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 1357 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
1352 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 1358 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
1353 | 1359 |
1354 } // namespace net | 1360 } // namespace net |
OLD | NEW |