summaryrefslogtreecommitdiffstats
path: root/net/socket/client_socket_pool_base.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 06:12:41 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 06:12:41 +0000
commit93054cc1fb19b52ab35ead21f28baf46c55bbfb9 (patch)
tree147ba83f7c0d01ba4b93f1e5e04fb09ea3c58588 /net/socket/client_socket_pool_base.h
parent896280751f9b58b33eafed60c0b3321755a0a3ac (diff)
downloadchromium_src-93054cc1fb19b52ab35ead21f28baf46c55bbfb9.zip
chromium_src-93054cc1fb19b52ab35ead21f28baf46c55bbfb9.tar.gz
chromium_src-93054cc1fb19b52ab35ead21f28baf46c55bbfb9.tar.bz2
Revert "Revert an idle sockets change to trigger reliability bot. Will revert again soon."
Review URL: http://codereview.chromium.org/2761001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket_pool_base.h')
-rw-r--r--net/socket/client_socket_pool_base.h21
1 files changed, 5 insertions, 16 deletions
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index a41696e..a037b0e 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -237,7 +237,7 @@ class ClientSocketPoolBaseHelper
return connect_job_factory_->ConnectionTimeout();
}
- void EnableBackupJobs() { backup_jobs_enabled_ = true; }
+ void enable_backup_jobs() { backup_jobs_enabled_ = true; }
private:
friend class base::RefCounted<ClientSocketPoolBaseHelper>;
@@ -403,13 +403,6 @@ class ClientSocketPoolBaseHelper
// Called when the backup socket timer fires.
void OnBackupSocketTimerFired(const std::string& group_name);
- // Closes one idle socket. Picks the first one encountered.
- // TODO(willchan): Consider a better algorithm for doing this. Perhaps we
- // should keep an ordered list of idle sockets, and close them in order.
- // Requires maintaining more state. It's not clear if it's worth it since
- // I'm not sure if we hit this situation often.
- void CloseOneIdleSocket();
-
GroupMap group_map_;
// Timer used to periodically prune idle sockets that timed out or can't be
@@ -449,13 +442,9 @@ class ClientSocketPoolBaseHelper
// |max_sockets_per_group_| limit. So choosing the next request involves
// selecting the highest priority request across *all* groups.
//
- // |may_have_stalled_group_| is not conclusive, since when we cancel pending
- // requests, we may reach the situation where we have the maximum number of
- // sockets, but not request is stalled because of the global socket limit
- // (although some requests may be blocked on the socket per group limit).
- // We don't strictly maintain |may_have_stalled_group_|, since that would
- // require a linear search through all groups in |group_map_| to see if one
- // of them is stalled.
+ // Since reaching the maximum number of sockets is an edge case, we make note
+ // of when it happens, and thus avoid doing the slower "scan all groups"
+ // in the common case.
bool may_have_stalled_group_;
const scoped_ptr<ConnectJobFactory> connect_job_factory_;
@@ -605,7 +594,7 @@ class ClientSocketPoolBase {
return histograms_;
}
- void EnableBackupJobs() { helper_->EnableBackupJobs(); }
+ void enable_backup_jobs() { helper_->enable_backup_jobs(); }
void Flush() { helper_->Flush(); }