| 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 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ | 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ | 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <cstring> | 9 #include <cstring> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 | 620 |
| 621 BoundNetLog net_log_; | 621 BoundNetLog net_log_; |
| 622 }; | 622 }; |
| 623 | 623 |
| 624 class MockTCPClientSocket : public MockClientSocket, public AsyncSocket { | 624 class MockTCPClientSocket : public MockClientSocket, public AsyncSocket { |
| 625 public: | 625 public: |
| 626 MockTCPClientSocket(const AddressList& addresses, net::NetLog* net_log, | 626 MockTCPClientSocket(const AddressList& addresses, net::NetLog* net_log, |
| 627 SocketDataProvider* socket); | 627 SocketDataProvider* socket); |
| 628 virtual ~MockTCPClientSocket(); | 628 virtual ~MockTCPClientSocket(); |
| 629 | 629 |
| 630 AddressList addresses() const { return addresses_; } | 630 const AddressList& addresses() const { return addresses_; } |
| 631 | 631 |
| 632 // Socket implementation. | 632 // Socket implementation. |
| 633 virtual int Read(IOBuffer* buf, int buf_len, | 633 virtual int Read(IOBuffer* buf, int buf_len, |
| 634 const CompletionCallback& callback) OVERRIDE; | 634 const CompletionCallback& callback) OVERRIDE; |
| 635 virtual int Write(IOBuffer* buf, int buf_len, | 635 virtual int Write(IOBuffer* buf, int buf_len, |
| 636 const CompletionCallback& callback) OVERRIDE; | 636 const CompletionCallback& callback) OVERRIDE; |
| 637 | 637 |
| 638 // StreamSocket implementation. | 638 // StreamSocket implementation. |
| 639 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 639 virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
| 640 virtual void Disconnect() OVERRIDE; | 640 virtual void Disconnect() OVERRIDE; |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 | 1047 |
| 1048 extern const char kSOCKS5OkRequest[]; | 1048 extern const char kSOCKS5OkRequest[]; |
| 1049 extern const int kSOCKS5OkRequestLength; | 1049 extern const int kSOCKS5OkRequestLength; |
| 1050 | 1050 |
| 1051 extern const char kSOCKS5OkResponse[]; | 1051 extern const char kSOCKS5OkResponse[]; |
| 1052 extern const int kSOCKS5OkResponseLength; | 1052 extern const int kSOCKS5OkResponseLength; |
| 1053 | 1053 |
| 1054 } // namespace net | 1054 } // namespace net |
| 1055 | 1055 |
| 1056 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1056 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| OLD | NEW |