OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "net/base/address_list.h" | 16 #include "net/base/address_list.h" |
17 #include "net/base/completion_callback.h" | 17 #include "net/base/completion_callback.h" |
18 #include "net/base/host_resolver.h" | 18 #include "net/base/host_resolver.h" |
19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
20 #include "net/base/net_log.h" | 20 #include "net/base/net_log.h" |
21 #include "net/base/single_request_host_resolver.h" | 21 #include "net/base/single_request_host_resolver.h" |
22 #include "net/socket/stream_socket.h" | 22 #include "net/socket/stream_socket.h" |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 | 25 |
26 class ClientSocketHandle; | 26 class ClientSocketHandle; |
27 class BoundNetLog; | 27 class BoundNetLog; |
28 | 28 |
29 // The SOCKS client socket implementation | 29 // The SOCKS client socket implementation |
30 class NET_TEST SOCKSClientSocket : public StreamSocket { | 30 class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket { |
31 public: | 31 public: |
32 // Takes ownership of the |transport_socket|, which should already be | 32 // Takes ownership of the |transport_socket|, which should already be |
33 // connected by the time Connect() is called. | 33 // connected by the time Connect() is called. |
34 // | 34 // |
35 // |req_info| contains the hostname and port to which the socket above will | 35 // |req_info| contains the hostname and port to which the socket above will |
36 // communicate to via the socks layer. For testing the referrer is optional. | 36 // communicate to via the socks layer. For testing the referrer is optional. |
37 SOCKSClientSocket(ClientSocketHandle* transport_socket, | 37 SOCKSClientSocket(ClientSocketHandle* transport_socket, |
38 const HostResolver::RequestInfo& req_info, | 38 const HostResolver::RequestInfo& req_info, |
39 HostResolver* host_resolver); | 39 HostResolver* host_resolver); |
40 | 40 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 HostResolver::RequestInfo host_request_info_; | 132 HostResolver::RequestInfo host_request_info_; |
133 | 133 |
134 BoundNetLog net_log_; | 134 BoundNetLog net_log_; |
135 | 135 |
136 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket); | 136 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket); |
137 }; | 137 }; |
138 | 138 |
139 } // namespace net | 139 } // namespace net |
140 | 140 |
141 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ | 141 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
OLD | NEW |