| 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_CLIENT_SOCKET_POOL_H_ | 5 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_H_ |
| 6 #define NET_SOCKET_CLIENT_SOCKET_POOL_H_ | 6 #define NET_SOCKET_CLIENT_SOCKET_POOL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 virtual int IdleSocketCount() const = 0; | 151 virtual int IdleSocketCount() const = 0; |
| 152 | 152 |
| 153 // The total number of idle sockets in a connection group. | 153 // The total number of idle sockets in a connection group. |
| 154 virtual int IdleSocketCountInGroup(const std::string& group_name) const = 0; | 154 virtual int IdleSocketCountInGroup(const std::string& group_name) const = 0; |
| 155 | 155 |
| 156 // Determine the LoadState of a connecting ClientSocketHandle. | 156 // Determine the LoadState of a connecting ClientSocketHandle. |
| 157 virtual LoadState GetLoadState(const std::string& group_name, | 157 virtual LoadState GetLoadState(const std::string& group_name, |
| 158 const ClientSocketHandle* handle) const = 0; | 158 const ClientSocketHandle* handle) const = 0; |
| 159 | 159 |
| 160 // Retrieves information on the current state of the pool as a | 160 // Retrieves information on the current state of the pool as a |
| 161 // DictionaryValue. Caller takes possession of the returned value. | 161 // DictionaryValue. |
| 162 // If |include_nested_pools| is true, the states of any nested | 162 // If |include_nested_pools| is true, the states of any nested |
| 163 // ClientSocketPools will be included. | 163 // ClientSocketPools will be included. |
| 164 virtual base::DictionaryValue* GetInfoAsValue( | 164 virtual scoped_ptr<base::DictionaryValue> GetInfoAsValue( |
| 165 const std::string& name, | 165 const std::string& name, |
| 166 const std::string& type, | 166 const std::string& type, |
| 167 bool include_nested_pools) const = 0; | 167 bool include_nested_pools) const = 0; |
| 168 | 168 |
| 169 // Returns the maximum amount of time to wait before retrying a connect. | 169 // Returns the maximum amount of time to wait before retrying a connect. |
| 170 static const int kMaxConnectRetryIntervalMs = 250; | 170 static const int kMaxConnectRetryIntervalMs = 250; |
| 171 | 171 |
| 172 static base::TimeDelta unused_idle_socket_timeout(); | 172 static base::TimeDelta unused_idle_socket_timeout(); |
| 173 static void set_unused_idle_socket_timeout(base::TimeDelta timeout); | 173 static void set_unused_idle_socket_timeout(base::TimeDelta timeout); |
| 174 | 174 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 192 const std::string& group_name, | 192 const std::string& group_name, |
| 193 const scoped_refptr<typename PoolType::SocketParams>& params, | 193 const scoped_refptr<typename PoolType::SocketParams>& params, |
| 194 int num_sockets, | 194 int num_sockets, |
| 195 const BoundNetLog& net_log) { | 195 const BoundNetLog& net_log) { |
| 196 pool->RequestSockets(group_name, ¶ms, num_sockets, net_log); | 196 pool->RequestSockets(group_name, ¶ms, num_sockets, net_log); |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace net | 199 } // namespace net |
| 200 | 200 |
| 201 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_H_ | 201 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |