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

Unified Diff: net/base/tcp_client_socket_pool.h

Issue 126065: Make TCPClientSocketPool own the ConnectingSockets. (Closed)
Patch Set: Merge Created 11 years, 6 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 | « no previous file | net/base/tcp_client_socket_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/tcp_client_socket_pool.h
diff --git a/net/base/tcp_client_socket_pool.h b/net/base/tcp_client_socket_pool.h
index ad75585e2c35a8d9a8366fe6bfddd03138abec64..33d2a5b99561c3a3dc495af5679a55a3afb36b6b 100644
--- a/net/base/tcp_client_socket_pool.h
+++ b/net/base/tcp_client_socket_pool.h
@@ -154,7 +154,6 @@ class TCPClientSocketPool : public ClientSocketPool {
scoped_refptr<TCPClientSocketPool> pool_;
SingleRequestHostResolver resolver_;
AddressList addresses_;
- bool canceled_;
// The time the Connect() method was called (if it got called).
base::Time connect_start_time_;
@@ -162,6 +161,9 @@ class TCPClientSocketPool : public ClientSocketPool {
DISALLOW_COPY_AND_ASSIGN(ConnectingSocket);
};
+ typedef std::map<const ClientSocketHandle*, ConnectingSocket*>
+ ConnectingSocketMap;
+
virtual ~TCPClientSocketPool();
static void InsertRequestIntoQueue(const Request& r,
@@ -184,11 +186,15 @@ class TCPClientSocketPool : public ClientSocketPool {
CleanupIdleSockets(false);
}
+ // Removes the ConnectingSocket corresponding to |handle| from the
+ // |connecting_socket_map_|.
+ void RemoveConnectingSocket(const ClientSocketHandle* handle);
+
ClientSocketFactory* const client_socket_factory_;
GroupMap group_map_;
- std::map<const ClientSocketHandle*, ConnectingSocket*> connecting_socket_map_;
+ ConnectingSocketMap connecting_socket_map_;
// Timer used to periodically prune idle sockets that timed out or can't be
// reused.
« no previous file with comments | « no previous file | net/base/tcp_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698