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

Unified Diff: net/socket/client_socket_pool_base.h

Issue 3191019: A/B experiment for re-establishing TCP connections (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/client_socket.cc ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_base.h
===================================================================
--- net/socket/client_socket_pool_base.h (revision 57274)
+++ net/socket/client_socket_pool_base.h (working copy)
@@ -239,7 +239,8 @@
return connect_job_factory_->ConnectionTimeout();
}
- void EnableBackupJobs() { backup_jobs_enabled_ = true; }
+ static void set_connect_backup_jobs_enabled(bool enabled);
+ void EnableConnectBackupJobs();
private:
friend class base::RefCounted<ClientSocketPoolBaseHelper>;
@@ -271,7 +272,7 @@
struct Group {
Group()
: active_socket_count(0),
- backup_job(NULL),
+ connect_backup_job(NULL),
backup_task(NULL) {
}
@@ -299,9 +300,9 @@
}
void CleanupBackupJob() {
- if (backup_job) {
- delete backup_job;
- backup_job = NULL;
+ if (connect_backup_job) {
+ delete connect_backup_job;
+ connect_backup_job = NULL;
}
if (backup_task) {
backup_task->Cancel();
@@ -314,7 +315,7 @@
RequestQueue pending_requests;
int active_socket_count; // number of active sockets used by clients
// A backup job in case the connect for this group takes too long.
- ConnectJob* backup_job;
+ ConnectJob* connect_backup_job;
CancelableTask* backup_task;
};
@@ -461,7 +462,7 @@
const scoped_ptr<ConnectJobFactory> connect_job_factory_;
// TODO(vandebo) Remove when backup jobs move to TCPClientSocketPool
- bool backup_jobs_enabled_;
+ bool connect_backup_jobs_enabled_;
// A factory to pin the backup_job tasks.
ScopedRunnableMethodFactory<ClientSocketPoolBaseHelper> method_factory_;
@@ -595,7 +596,7 @@
return histograms_;
}
- void EnableBackupJobs() { helper_->EnableBackupJobs(); }
+ void EnableConnectBackupJobs() { helper_->EnableConnectBackupJobs(); }
void Flush() { helper_->Flush(); }
« no previous file with comments | « net/socket/client_socket.cc ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698