| 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_POOL_H_ | 5 #ifndef NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ |
| 6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ | 6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Otherwise, it returns a net error code. | 92 // Otherwise, it returns a net error code. |
| 93 virtual int ConnectInternal(); | 93 virtual int ConnectInternal(); |
| 94 | 94 |
| 95 scoped_refptr<SOCKSSocketParams> socks_params_; | 95 scoped_refptr<SOCKSSocketParams> socks_params_; |
| 96 TransportClientSocketPool* const transport_pool_; | 96 TransportClientSocketPool* const transport_pool_; |
| 97 HostResolver* const resolver_; | 97 HostResolver* const resolver_; |
| 98 | 98 |
| 99 State next_state_; | 99 State next_state_; |
| 100 CompletionCallbackImpl<SOCKSConnectJob> callback_; | 100 CompletionCallbackImpl<SOCKSConnectJob> callback_; |
| 101 scoped_ptr<ClientSocketHandle> transport_socket_handle_; | 101 scoped_ptr<ClientSocketHandle> transport_socket_handle_; |
| 102 scoped_ptr<ClientSocket> socket_; | 102 scoped_ptr<StreamSocket> socket_; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(SOCKSConnectJob); | 104 DISALLOW_COPY_AND_ASSIGN(SOCKSConnectJob); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 class SOCKSClientSocketPool : public ClientSocketPool { | 107 class SOCKSClientSocketPool : public ClientSocketPool { |
| 108 public: | 108 public: |
| 109 SOCKSClientSocketPool( | 109 SOCKSClientSocketPool( |
| 110 int max_sockets, | 110 int max_sockets, |
| 111 int max_sockets_per_group, | 111 int max_sockets_per_group, |
| 112 ClientSocketPoolHistograms* histograms, | 112 ClientSocketPoolHistograms* histograms, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 126 | 126 |
| 127 virtual void RequestSockets(const std::string& group_name, | 127 virtual void RequestSockets(const std::string& group_name, |
| 128 const void* params, | 128 const void* params, |
| 129 int num_sockets, | 129 int num_sockets, |
| 130 const BoundNetLog& net_log); | 130 const BoundNetLog& net_log); |
| 131 | 131 |
| 132 virtual void CancelRequest(const std::string& group_name, | 132 virtual void CancelRequest(const std::string& group_name, |
| 133 ClientSocketHandle* handle); | 133 ClientSocketHandle* handle); |
| 134 | 134 |
| 135 virtual void ReleaseSocket(const std::string& group_name, | 135 virtual void ReleaseSocket(const std::string& group_name, |
| 136 ClientSocket* socket, | 136 StreamSocket* socket, |
| 137 int id); | 137 int id); |
| 138 | 138 |
| 139 virtual void Flush(); | 139 virtual void Flush(); |
| 140 | 140 |
| 141 virtual void CloseIdleSockets(); | 141 virtual void CloseIdleSockets(); |
| 142 | 142 |
| 143 virtual int IdleSocketCount() const; | 143 virtual int IdleSocketCount() const; |
| 144 | 144 |
| 145 virtual int IdleSocketCountInGroup(const std::string& group_name) const; | 145 virtual int IdleSocketCountInGroup(const std::string& group_name) const; |
| 146 | 146 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 PoolBase base_; | 189 PoolBase base_; |
| 190 | 190 |
| 191 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocketPool); | 191 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocketPool); |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 REGISTER_SOCKET_PARAMS_FOR_POOL(SOCKSClientSocketPool, SOCKSSocketParams); | 194 REGISTER_SOCKET_PARAMS_FOR_POOL(SOCKSClientSocketPool, SOCKSSocketParams); |
| 195 | 195 |
| 196 } // namespace net | 196 } // namespace net |
| 197 | 197 |
| 198 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ | 198 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |