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

Side by Side Diff: net/socket/tcp_client_socket_pool.h

Issue 149027: Limit total number of sockets in the system.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: reorder Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/tcp_client_socket_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_ 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_
6 #define NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_ 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 State next_state_; 63 State next_state_;
64 64
65 // The time the Connect() method was called (if it got called). 65 // The time the Connect() method was called (if it got called).
66 base::TimeTicks connect_start_time_; 66 base::TimeTicks connect_start_time_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(TCPConnectJob); 68 DISALLOW_COPY_AND_ASSIGN(TCPConnectJob);
69 }; 69 };
70 70
71 class TCPClientSocketPool : public ClientSocketPool { 71 class TCPClientSocketPool : public ClientSocketPool {
72 public: 72 public:
73 TCPClientSocketPool(int max_sockets_per_group, 73 TCPClientSocketPool(int max_sockets,
74 int max_sockets_per_group,
74 HostResolver* host_resolver, 75 HostResolver* host_resolver,
75 ClientSocketFactory* client_socket_factory); 76 ClientSocketFactory* client_socket_factory);
76 77
77 // ClientSocketPool methods: 78 // ClientSocketPool methods:
78 79
79 virtual int RequestSocket(const std::string& group_name, 80 virtual int RequestSocket(const std::string& group_name,
80 const HostResolver::RequestInfo& resolve_info, 81 const HostResolver::RequestInfo& resolve_info,
81 int priority, 82 int priority,
82 ClientSocketHandle* handle, 83 ClientSocketHandle* handle,
83 CompletionCallback* callback); 84 CompletionCallback* callback);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // the posting of the task and the execution, then we'll hit the DCHECK that 133 // the posting of the task and the execution, then we'll hit the DCHECK that
133 // |ClientSocketPoolBase::group_map_| is empty. 134 // |ClientSocketPoolBase::group_map_| is empty.
134 scoped_refptr<ClientSocketPoolBase> base_; 135 scoped_refptr<ClientSocketPoolBase> base_;
135 136
136 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketPool); 137 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketPool);
137 }; 138 };
138 139
139 } // namespace net 140 } // namespace net
140 141
141 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_ 142 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_POOL_H_
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/tcp_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698