| 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 #include "net/socket/client_socket_pool.h" | 5 #include "net/socket/client_socket_pool.h" |
| 6 | 6 |
| 7 namespace { | 7 namespace { |
| 8 | 8 |
| 9 // The maximum duration, in seconds, to keep used idle persistent sockets | 9 // The maximum duration, in seconds, to keep used idle persistent sockets |
| 10 // alive. | 10 // alive. |
| 11 // TODO(ziadh): Change this timeout after getting histogram data on how long it | 11 // TODO(ziadh): Change this timeout after getting histogram data on how long it |
| 12 // should be. | 12 // should be. |
| 13 int g_unused_idle_socket_timeout = 10; | 13 int g_unused_idle_socket_timeout = 10; |
| 14 | 14 |
| 15 } // namespace | 15 } // namespace |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 // static | 19 // static |
| 20 int ClientSocketPool::unused_idle_socket_timeout() { | 20 int ClientSocketPool::unused_idle_socket_timeout() { |
| 21 return g_unused_idle_socket_timeout; | 21 return g_unused_idle_socket_timeout; |
| 22 } | 22 } |
| 23 | 23 |
| 24 // static | 24 // static |
| 25 void ClientSocketPool::set_unused_idle_socket_timeout(int timeout) { | 25 void ClientSocketPool::set_unused_idle_socket_timeout(int timeout) { |
| 26 g_unused_idle_socket_timeout = timeout; | 26 g_unused_idle_socket_timeout = timeout; |
| 27 } | 27 } |
| 28 | 28 |
| 29 ClientSocketPool::ClientSocketPool() {} |
| 30 |
| 31 ClientSocketPool::~ClientSocketPool() {} |
| 32 |
| 29 } // namespace net | 33 } // namespace net |
| OLD | NEW |