| 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 #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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 ClientSocketHandle* handle); | 131 ClientSocketHandle* handle); |
| 132 | 132 |
| 133 virtual void ReleaseSocket(const std::string& group_name, | 133 virtual void ReleaseSocket(const std::string& group_name, |
| 134 ClientSocket* socket, | 134 ClientSocket* socket, |
| 135 int id); | 135 int id); |
| 136 | 136 |
| 137 virtual void Flush(); | 137 virtual void Flush(); |
| 138 | 138 |
| 139 virtual void CloseIdleSockets(); | 139 virtual void CloseIdleSockets(); |
| 140 | 140 |
| 141 virtual int IdleSocketCount() const { | 141 virtual int IdleSocketCount() const; |
| 142 return base_.idle_socket_count(); | |
| 143 } | |
| 144 | 142 |
| 145 virtual int IdleSocketCountInGroup(const std::string& group_name) const; | 143 virtual int IdleSocketCountInGroup(const std::string& group_name) const; |
| 146 | 144 |
| 147 virtual LoadState GetLoadState(const std::string& group_name, | 145 virtual LoadState GetLoadState(const std::string& group_name, |
| 148 const ClientSocketHandle* handle) const; | 146 const ClientSocketHandle* handle) const; |
| 149 | 147 |
| 150 virtual DictionaryValue* GetInfoAsValue(const std::string& name, | 148 virtual DictionaryValue* GetInfoAsValue(const std::string& name, |
| 151 const std::string& type, | 149 const std::string& type, |
| 152 bool include_nested_pools) const; | 150 bool include_nested_pools) const; |
| 153 | 151 |
| 154 virtual base::TimeDelta ConnectionTimeout() const { | 152 virtual base::TimeDelta ConnectionTimeout() const; |
| 155 return base_.ConnectionTimeout(); | |
| 156 } | |
| 157 | 153 |
| 158 virtual ClientSocketPoolHistograms* histograms() const { | 154 virtual ClientSocketPoolHistograms* histograms() const; |
| 159 return base_.histograms(); | |
| 160 }; | |
| 161 | 155 |
| 162 private: | 156 private: |
| 163 typedef ClientSocketPoolBase<SOCKSSocketParams> PoolBase; | 157 typedef ClientSocketPoolBase<SOCKSSocketParams> PoolBase; |
| 164 | 158 |
| 165 class SOCKSConnectJobFactory : public PoolBase::ConnectJobFactory { | 159 class SOCKSConnectJobFactory : public PoolBase::ConnectJobFactory { |
| 166 public: | 160 public: |
| 167 SOCKSConnectJobFactory(TCPClientSocketPool* tcp_pool, | 161 SOCKSConnectJobFactory(TCPClientSocketPool* tcp_pool, |
| 168 HostResolver* host_resolver, | 162 HostResolver* host_resolver, |
| 169 NetLog* net_log) | 163 NetLog* net_log) |
| 170 : tcp_pool_(tcp_pool), | 164 : tcp_pool_(tcp_pool), |
| (...skipping 22 matching lines...) Expand all Loading... |
| 193 PoolBase base_; | 187 PoolBase base_; |
| 194 | 188 |
| 195 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocketPool); | 189 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocketPool); |
| 196 }; | 190 }; |
| 197 | 191 |
| 198 REGISTER_SOCKET_PARAMS_FOR_POOL(SOCKSClientSocketPool, SOCKSSocketParams); | 192 REGISTER_SOCKET_PARAMS_FOR_POOL(SOCKSClientSocketPool, SOCKSSocketParams); |
| 199 | 193 |
| 200 } // namespace net | 194 } // namespace net |
| 201 | 195 |
| 202 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ | 196 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |