| Index: net/socket/client_socket_pool_base.h
|
| diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
|
| index 9e46e5eabd885c7f9c541b7b5b8b760ad2ddecf8..26219ccd2f54c2412f2e20b9665cbefe207d780a 100644
|
| --- a/net/socket/client_socket_pool_base.h
|
| +++ b/net/socket/client_socket_pool_base.h
|
| @@ -45,6 +45,7 @@
|
| #include "net/base/request_priority.h"
|
| #include "net/socket/client_socket_pool.h"
|
| #include "net/socket/stream_socket.h"
|
| +#include "net/socket/client_socket_pool_options.h"
|
|
|
| namespace net {
|
|
|
| @@ -235,7 +236,8 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
|
| int max_sockets_per_group,
|
| base::TimeDelta unused_idle_socket_timeout,
|
| base::TimeDelta used_idle_socket_timeout,
|
| - ConnectJobFactory* connect_job_factory);
|
| + ConnectJobFactory* connect_job_factory,
|
| + const ClientSocketPoolOptions& options);
|
|
|
| virtual ~ClientSocketPoolBaseHelper();
|
|
|
| @@ -442,6 +444,9 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
|
| void IncrementIdleCount();
|
| void DecrementIdleCount();
|
|
|
| + // Start cleanup timer for idle sockets.
|
| + void StartIdleSocketTimer();
|
| +
|
| // Scans the group map for groups which have an available socket slot and
|
| // at least one pending request. Returns true if any groups are stalled, and
|
| // if so, fills |group| and |group_name| with data of the stalled group
|
| @@ -552,6 +557,9 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
|
| // The maximum number of sockets kept per group.
|
| const int max_sockets_per_group_;
|
|
|
| + // Whether to use timer to cleanup idle sockets.
|
| + bool use_cleanup_timer_;
|
| +
|
| // The time to wait until closing idle sockets.
|
| const base::TimeDelta unused_idle_socket_timeout_;
|
| const base::TimeDelta used_idle_socket_timeout_;
|
| @@ -623,11 +631,13 @@ class ClientSocketPoolBase {
|
| ClientSocketPoolHistograms* histograms,
|
| base::TimeDelta unused_idle_socket_timeout,
|
| base::TimeDelta used_idle_socket_timeout,
|
| - ConnectJobFactory* connect_job_factory)
|
| + ConnectJobFactory* connect_job_factory,
|
| + const ClientSocketPoolOptions& options = ClientSocketPoolOptions())
|
| : histograms_(histograms),
|
| helper_(max_sockets, max_sockets_per_group,
|
| unused_idle_socket_timeout, used_idle_socket_timeout,
|
| - new ConnectJobFactoryAdaptor(connect_job_factory)) {}
|
| + new ConnectJobFactoryAdaptor(connect_job_factory),
|
| + options) {}
|
|
|
| virtual ~ClientSocketPoolBase() {}
|
|
|
|
|