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_SOCKS_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
7 | 7 |
| 8 #include <stddef.h> |
8 #include <stdint.h> | 9 #include <stdint.h> |
9 | 10 |
10 #include <string> | 11 #include <string> |
11 | 12 |
12 #include "base/basictypes.h" | |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
16 #include "net/base/address_list.h" | 17 #include "net/base/address_list.h" |
17 #include "net/base/completion_callback.h" | 18 #include "net/base/completion_callback.h" |
18 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
19 #include "net/dns/host_resolver.h" | 20 #include "net/dns/host_resolver.h" |
20 #include "net/dns/single_request_host_resolver.h" | 21 #include "net/dns/single_request_host_resolver.h" |
21 #include "net/log/net_log.h" | 22 #include "net/log/net_log.h" |
22 #include "net/socket/stream_socket.h" | 23 #include "net/socket/stream_socket.h" |
23 | 24 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 int64_t GetTotalReceivedBytes() const override; | 61 int64_t GetTotalReceivedBytes() const override; |
61 | 62 |
62 // Socket implementation. | 63 // Socket implementation. |
63 int Read(IOBuffer* buf, | 64 int Read(IOBuffer* buf, |
64 int buf_len, | 65 int buf_len, |
65 const CompletionCallback& callback) override; | 66 const CompletionCallback& callback) override; |
66 int Write(IOBuffer* buf, | 67 int Write(IOBuffer* buf, |
67 int buf_len, | 68 int buf_len, |
68 const CompletionCallback& callback) override; | 69 const CompletionCallback& callback) override; |
69 | 70 |
70 int SetReceiveBufferSize(int32 size) override; | 71 int SetReceiveBufferSize(int32_t size) override; |
71 int SetSendBufferSize(int32 size) override; | 72 int SetSendBufferSize(int32_t size) override; |
72 | 73 |
73 int GetPeerAddress(IPEndPoint* address) const override; | 74 int GetPeerAddress(IPEndPoint* address) const override; |
74 int GetLocalAddress(IPEndPoint* address) const override; | 75 int GetLocalAddress(IPEndPoint* address) const override; |
75 | 76 |
76 private: | 77 private: |
77 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, CompleteHandshake); | 78 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, CompleteHandshake); |
78 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AFailedDNS); | 79 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AFailedDNS); |
79 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6); | 80 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6); |
80 | 81 |
81 enum State { | 82 enum State { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 RequestPriority priority_; | 138 RequestPriority priority_; |
138 | 139 |
139 BoundNetLog net_log_; | 140 BoundNetLog net_log_; |
140 | 141 |
141 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket); | 142 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket); |
142 }; | 143 }; |
143 | 144 |
144 } // namespace net | 145 } // namespace net |
145 | 146 |
146 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ | 147 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
OLD | NEW |