| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TCP_CLIENT_SOCKET_POOL_H_ | 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_ |
| 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_ | 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 void OnCleanupTimerFired() { | 233 void OnCleanupTimerFired() { |
| 234 CleanupIdleSockets(false); | 234 CleanupIdleSockets(false); |
| 235 } | 235 } |
| 236 | 236 |
| 237 // Removes the ConnectingSocket corresponding to |handle| from the | 237 // Removes the ConnectingSocket corresponding to |handle| from the |
| 238 // |connecting_socket_map_|. | 238 // |connecting_socket_map_|. |
| 239 void RemoveConnectingSocket(const ClientSocketHandle* handle); | 239 void RemoveConnectingSocket(const ClientSocketHandle* handle); |
| 240 | 240 |
| 241 static void CheckSocketCounts(const Group& group); | 241 static void CheckSocketCounts(const Group& group); |
| 242 | 242 |
| 243 // Remove an active socket. |
| 244 void RemoveActiveSocket(const std::string& group_name, Group* group); |
| 245 |
| 243 // Process a request from a group's pending_requests queue. | 246 // Process a request from a group's pending_requests queue. |
| 244 void ProcessPendingRequest(const std::string& group_name, Group* group); | 247 void ProcessPendingRequest(const std::string& group_name, Group* group); |
| 245 | 248 |
| 246 GroupMap group_map_; | 249 GroupMap group_map_; |
| 247 | 250 |
| 248 ConnectingSocketMap connecting_socket_map_; | 251 ConnectingSocketMap connecting_socket_map_; |
| 249 | 252 |
| 250 // Timer used to periodically prune idle sockets that timed out or can't be | 253 // Timer used to periodically prune idle sockets that timed out or can't be |
| 251 // reused. | 254 // reused. |
| 252 base::RepeatingTimer<ClientSocketPoolBase> timer_; | 255 base::RepeatingTimer<ClientSocketPoolBase> timer_; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 // the posting of the task and the execution, then we'll hit the DCHECK that | 334 // the posting of the task and the execution, then we'll hit the DCHECK that |
| 332 // |ClientSocketPoolBase::group_map_| is empty. | 335 // |ClientSocketPoolBase::group_map_| is empty. |
| 333 scoped_refptr<ClientSocketPoolBase> base_; | 336 scoped_refptr<ClientSocketPoolBase> base_; |
| 334 | 337 |
| 335 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketPool); | 338 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketPool); |
| 336 }; | 339 }; |
| 337 | 340 |
| 338 } // namespace net | 341 } // namespace net |
| 339 | 342 |
| 340 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_ | 343 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |