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 #include "net/base/client_socket_pool.h" | 5 #include "net/base/client_socket_pool.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "net/base/client_socket.h" | 8 #include "net/base/client_socket.h" |
9 #include "net/base/client_socket_handle.h" | 9 #include "net/base/client_socket_handle.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
11 | 11 |
| 12 using base::TimeDelta; |
| 13 |
12 namespace { | 14 namespace { |
13 | 15 |
14 // The timeout value, in seconds, used to clean up disconnected idle sockets. | 16 // The timeout value, in seconds, used to clean up disconnected idle sockets. |
15 const int kCleanupInterval = 5; | 17 const int kCleanupInterval = 5; |
16 | 18 |
17 } // namespace | 19 } // namespace |
18 | 20 |
19 namespace net { | 21 namespace net { |
20 | 22 |
21 ClientSocketPool::ClientSocketPool(int max_sockets_per_group) | 23 ClientSocketPool::ClientSocketPool(int max_sockets_per_group) |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 group_map_.erase(i); | 174 group_map_.erase(i); |
173 } | 175 } |
174 } | 176 } |
175 | 177 |
176 void ClientSocketPool::DoTimeout() { | 178 void ClientSocketPool::DoTimeout() { |
177 MaybeCloseIdleSockets(true); | 179 MaybeCloseIdleSockets(true); |
178 } | 180 } |
179 | 181 |
180 } // namespace net | 182 } // namespace net |
181 | 183 |
OLD | NEW |