Chromium Code Reviews| 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 8079cd4e5c74a80b5f7c1e802c7c009a4557829d..b8504b726c1ea3dc848a51dafb01b1f392b7d725 100644 |
| --- a/net/socket/client_socket_pool_base.h |
| +++ b/net/socket/client_socket_pool_base.h |
| @@ -203,7 +203,7 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper |
| virtual scoped_ptr<ConnectJob> NewConnectJob( |
| const std::string& group_name, |
| const Request& request, |
| - ConnectJob::Delegate* delegate) const = 0; |
| + ConnectJob::Delegate* delegate) = 0; |
|
wtc
2014/08/12 14:51:00
Why can't this method be const? I guess it's becau
mshelley
2014/08/12 21:47:00
Done.
|
| virtual base::TimeDelta ConnectionTimeout() const = 0; |
| @@ -291,6 +291,9 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper |
| bool HasGroup(const std::string& group_name) const; |
| + void RemoveMessengersFromGroup(const std::string& group_name, |
| + const std::string& cache_key) const; |
|
Ryan Sleevi
2014/08/12 00:27:42
This feels like a layering violation. ClientSocket
mshelley
2014/08/12 21:47:00
Done.
|
| + |
| // Called to enable/disable cleaning up idle sockets. When enabled, |
| // idle sockets that have been around for longer than a period defined |
| // by kCleanupInterval are cleaned up using a timer. Otherwise they are |
| @@ -414,6 +417,7 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper |
| // Remove |job| from this group, which must already own |job|. |
| void RemoveJob(ConnectJob* job); |
| void RemoveAllJobs(); |
| + void RemoveMessengers(const std::string& cache_key); |
| bool has_pending_requests() const { |
| return !pending_requests_.empty(); |
| @@ -686,7 +690,7 @@ class ClientSocketPoolBase { |
| virtual scoped_ptr<ConnectJob> NewConnectJob( |
| const std::string& group_name, |
| const Request& request, |
| - ConnectJob::Delegate* delegate) const = 0; |
| + ConnectJob::Delegate* delegate) = 0; |
| virtual base::TimeDelta ConnectionTimeout() const = 0; |
| @@ -812,6 +816,11 @@ class ClientSocketPoolBase { |
| return helper_.HasGroup(group_name); |
| } |
| + void RemoveMessengersFromGroup(const std::string& group_name, |
| + const std::string& cache_key) const { |
| + return helper_.RemoveMessengersFromGroup(group_name, cache_key); |
| + } |
| + |
| void CleanupIdleSockets(bool force) { |
| return helper_.CleanupIdleSockets(force); |
| } |
| @@ -856,7 +865,7 @@ class ClientSocketPoolBase { |
| virtual scoped_ptr<ConnectJob> NewConnectJob( |
| const std::string& group_name, |
| const internal::ClientSocketPoolBaseHelper::Request& request, |
| - ConnectJob::Delegate* delegate) const OVERRIDE { |
| + ConnectJob::Delegate* delegate) OVERRIDE { |
| const Request& casted_request = static_cast<const Request&>(request); |
| return connect_job_factory_->NewConnectJob( |
| group_name, casted_request, delegate); |