| 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 MockSSLClientSocket::MockSSLClientSocket( | 467 MockSSLClientSocket::MockSSLClientSocket( |
| 468 net::ClientSocketHandle* transport_socket, | 468 net::ClientSocketHandle* transport_socket, |
| 469 const HostPortPair& host_port_pair, | 469 const HostPortPair& host_port_pair, |
| 470 const net::SSLConfig& ssl_config, | 470 const net::SSLConfig& ssl_config, |
| 471 SSLHostInfo* ssl_host_info, | 471 SSLHostInfo* ssl_host_info, |
| 472 net::SSLSocketDataProvider* data) | 472 net::SSLSocketDataProvider* data) |
| 473 : MockClientSocket(transport_socket->socket()->NetLog().net_log()), | 473 : MockClientSocket(transport_socket->socket()->NetLog().net_log()), |
| 474 transport_(transport_socket), | 474 transport_(transport_socket), |
| 475 data_(data), | 475 data_(data), |
| 476 is_npn_state_set_(false), | 476 is_npn_state_set_(false), |
| 477 new_npn_value_(false) { | 477 new_npn_value_(false), |
| 478 was_used_to_convey_data_(false), |
| 479 host_and_port_(host_port_pair), |
| 480 ssl_config_(ssl_config) { |
| 478 DCHECK(data_); | 481 DCHECK(data_); |
| 479 delete ssl_host_info; // we take ownership but don't use it. | 482 delete ssl_host_info; // we take ownership but don't use it. |
| 480 } | 483 } |
| 481 | 484 |
| 482 MockSSLClientSocket::~MockSSLClientSocket() { | 485 MockSSLClientSocket::~MockSSLClientSocket() { |
| 483 Disconnect(); | 486 Disconnect(); |
| 484 } | 487 } |
| 485 | 488 |
| 486 int MockSSLClientSocket::Connect(net::CompletionCallback* callback) { | 489 int MockSSLClientSocket::Connect(net::CompletionCallback* callback) { |
| 487 ConnectCallback* connect_callback = new ConnectCallback( | 490 ConnectCallback* connect_callback = new ConnectCallback( |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 | 1295 |
| 1293 const char kSOCKS5OkRequest[] = | 1296 const char kSOCKS5OkRequest[] = |
| 1294 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 1297 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
| 1295 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 1298 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
| 1296 | 1299 |
| 1297 const char kSOCKS5OkResponse[] = | 1300 const char kSOCKS5OkResponse[] = |
| 1298 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 1301 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
| 1299 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 1302 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
| 1300 | 1303 |
| 1301 } // namespace net | 1304 } // namespace net |
| OLD | NEW |