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

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

Issue 2050005: Reland 46757. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Reduce large iteration check. Created 10 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
« no previous file with comments | « no previous file | net/socket/client_socket_pool_base.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 401
402 // The total number of idle sockets in the system. 402 // The total number of idle sockets in the system.
403 int idle_socket_count_; 403 int idle_socket_count_;
404 404
405 // Number of connecting sockets across all groups. 405 // Number of connecting sockets across all groups.
406 int connecting_socket_count_; 406 int connecting_socket_count_;
407 407
408 // Number of connected sockets we handed out across all groups. 408 // Number of connected sockets we handed out across all groups.
409 int handed_out_socket_count_; 409 int handed_out_socket_count_;
410 410
411 // Number of sockets being released.
412 int num_releasing_sockets_;
413
411 // The maximum total number of sockets. See ReachedMaxSocketsLimit. 414 // The maximum total number of sockets. See ReachedMaxSocketsLimit.
412 const int max_sockets_; 415 const int max_sockets_;
413 416
414 // The maximum number of sockets kept per group. 417 // The maximum number of sockets kept per group.
415 const int max_sockets_per_group_; 418 const int max_sockets_per_group_;
416 419
417 // The time to wait until closing idle sockets. 420 // The time to wait until closing idle sockets.
418 const base::TimeDelta unused_idle_socket_timeout_; 421 const base::TimeDelta unused_idle_socket_timeout_;
419 const base::TimeDelta used_idle_socket_timeout_; 422 const base::TimeDelta used_idle_socket_timeout_;
420 423
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 // the posting of the task and the execution, then we'll hit the DCHECK that 623 // the posting of the task and the execution, then we'll hit the DCHECK that
621 // |ClientSocketPoolBaseHelper::group_map_| is empty. 624 // |ClientSocketPoolBaseHelper::group_map_| is empty.
622 scoped_refptr<internal::ClientSocketPoolBaseHelper> helper_; 625 scoped_refptr<internal::ClientSocketPoolBaseHelper> helper_;
623 626
624 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase); 627 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase);
625 }; 628 };
626 629
627 } // namespace net 630 } // namespace net
628 631
629 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_ 632 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_
OLDNEW
« no previous file with comments | « no previous file | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698