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

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

Issue 1992010: Revert 46757 - Fix IO thread hang on releasing a socket.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
« 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
414 // The maximum total number of sockets. See ReachedMaxSocketsLimit. 411 // The maximum total number of sockets. See ReachedMaxSocketsLimit.
415 const int max_sockets_; 412 const int max_sockets_;
416 413
417 // The maximum number of sockets kept per group. 414 // The maximum number of sockets kept per group.
418 const int max_sockets_per_group_; 415 const int max_sockets_per_group_;
419 416
420 // The time to wait until closing idle sockets. 417 // The time to wait until closing idle sockets.
421 const base::TimeDelta unused_idle_socket_timeout_; 418 const base::TimeDelta unused_idle_socket_timeout_;
422 const base::TimeDelta used_idle_socket_timeout_; 419 const base::TimeDelta used_idle_socket_timeout_;
423 420
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // the posting of the task and the execution, then we'll hit the DCHECK that 620 // the posting of the task and the execution, then we'll hit the DCHECK that
624 // |ClientSocketPoolBaseHelper::group_map_| is empty. 621 // |ClientSocketPoolBaseHelper::group_map_| is empty.
625 scoped_refptr<internal::ClientSocketPoolBaseHelper> helper_; 622 scoped_refptr<internal::ClientSocketPoolBaseHelper> helper_;
626 623
627 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase); 624 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase);
628 }; 625 };
629 626
630 } // namespace net 627 } // namespace net
631 628
632 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_ 629 #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