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

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

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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/http/http_stream_parser.h ('k') | net/socket/client_socket_pool_manager.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // A ClientSocketPoolBase is used to restrict the number of sockets open at 5 // A ClientSocketPoolBase is used to restrict the number of sockets open at
6 // a time. It also maintains a list of idle persistent sockets for reuse. 6 // a time. It also maintains a list of idle persistent sockets for reuse.
7 // Subclasses of ClientSocketPool should compose ClientSocketPoolBase to handle 7 // Subclasses of ClientSocketPool should compose ClientSocketPoolBase to handle
8 // the core logic of (1) restricting the number of active (connected or 8 // the core logic of (1) restricting the number of active (connected or
9 // connecting) sockets per "group" (generally speaking, the hostname), (2) 9 // connecting) sockets per "group" (generally speaking, the hostname), (2)
10 // maintaining a per-group list of idle, persistent sockets for reuse, and (3) 10 // maintaining a per-group list of idle, persistent sockets for reuse, and (3)
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 DISALLOW_COPY_AND_ASSIGN(ConnectJobFactory); 212 DISALLOW_COPY_AND_ASSIGN(ConnectJobFactory);
213 }; 213 };
214 214
215 ClientSocketPoolBaseHelper( 215 ClientSocketPoolBaseHelper(
216 int max_sockets, 216 int max_sockets,
217 int max_sockets_per_group, 217 int max_sockets_per_group,
218 base::TimeDelta unused_idle_socket_timeout, 218 base::TimeDelta unused_idle_socket_timeout,
219 base::TimeDelta used_idle_socket_timeout, 219 base::TimeDelta used_idle_socket_timeout,
220 ConnectJobFactory* connect_job_factory); 220 ConnectJobFactory* connect_job_factory);
221 221
222 ~ClientSocketPoolBaseHelper(); 222 virtual ~ClientSocketPoolBaseHelper();
223 223
224 // See ClientSocketPool::RequestSocket for documentation on this function. 224 // See ClientSocketPool::RequestSocket for documentation on this function.
225 // ClientSocketPoolBaseHelper takes ownership of |request|, which must be 225 // ClientSocketPoolBaseHelper takes ownership of |request|, which must be
226 // heap allocated. 226 // heap allocated.
227 int RequestSocket(const std::string& group_name, const Request* request); 227 int RequestSocket(const std::string& group_name, const Request* request);
228 228
229 // See ClientSocketPool::RequestSocket for documentation on this function. 229 // See ClientSocketPool::RequestSocket for documentation on this function.
230 void RequestSockets(const std::string& group_name, 230 void RequestSockets(const std::string& group_name,
231 const Request& request, 231 const Request& request,
232 int num_sockets); 232 int num_sockets);
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 // Histograms for the pool 746 // Histograms for the pool
747 ClientSocketPoolHistograms* const histograms_; 747 ClientSocketPoolHistograms* const histograms_;
748 internal::ClientSocketPoolBaseHelper helper_; 748 internal::ClientSocketPoolBaseHelper helper_;
749 749
750 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase); 750 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase);
751 }; 751 };
752 752
753 } // namespace net 753 } // namespace net
754 754
755 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_ 755 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_parser.h ('k') | net/socket/client_socket_pool_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698