Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: net/socket/client_socket_pool_base.h

Issue 2678353003: Close idle H2 sockets when SpdySession is initialized. (Closed)
Patch Set: Address comments to hook directly to ClientSocketHandle Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/client_socket_pool.h ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2bcfdc8d9839c9ec4ba3cee928f1e350ca61c8aa..904024dd8e36ad367075253ba09a2e4efc5be222 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -293,6 +293,9 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
// See ClientSocketPool::CloseIdleSockets for documentation on this function.
void CloseIdleSockets();
+ // See ClientSocketPool::CloseIdleSocketsInGroup for documentation.
+ void CloseIdleSocketsInGroup(const std::string& group_name);
+
// See ClientSocketPool::IdleSocketCount() for documentation on this function.
int idle_socket_count() const {
return idle_socket_count_;
@@ -537,6 +540,13 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper
typedef std::map<const ClientSocketHandle*, CallbackResultPair>
PendingCallbackMap;
+ // Closes all idle sockets in |group| if |force| is true. Else, only closes
+ // idle sockets in |group| that timed out with respect to |now| or can't be
+ // reused.
+ void CleanupIdleSocketsInGroup(bool force,
+ Group* group,
+ const base::TimeTicks& now);
+
Group* GetOrCreateGroup(const std::string& group_name);
void RemoveGroup(const std::string& group_name);
void RemoveGroup(GroupMap::iterator it);
@@ -806,6 +816,10 @@ class ClientSocketPoolBase {
void CloseIdleSockets() { return helper_.CloseIdleSockets(); }
+ void CloseIdleSocketsInGroup(const std::string& group_name) {
+ return helper_.CloseIdleSocketsInGroup(group_name);
+ }
+
int idle_socket_count() const { return helper_.idle_socket_count(); }
int IdleSocketCountInGroup(const std::string& group_name) const {
« no previous file with comments | « net/socket/client_socket_pool.h ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698