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

Unified Diff: net/socket/client_socket_pool_base.h

Issue 1120007: Disable backup connect jobs for all pools except TCPClientSocketPool (Closed)
Patch Set: Created 10 years, 9 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 | « no previous file | 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
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index f6041a16653c121f253ef9cab5e6137f415efe11..08fb0f0cca9e69efcdd91b6e7e44191192c0eb4b 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -222,6 +222,8 @@ class ClientSocketPoolBaseHelper
// sockets that timed out or can't be reused. Made public for testing.
void CleanupIdleSockets(bool force);
+ void enable_backup_jobs() { backup_jobs_enabled_ = true; };
+
private:
friend class base::RefCounted<ClientSocketPoolBaseHelper>;
@@ -427,6 +429,9 @@ class ClientSocketPoolBaseHelper
NetworkChangeNotifier* const network_change_notifier_;
+ // TODO(vandebo) Remove when backup jobs move to TCPClientSocketPool
+ bool backup_jobs_enabled_;
+
// A factory to pin the backup_job tasks.
ScopedRunnableMethodFactory<ClientSocketPoolBaseHelper> method_factory_;
};
@@ -555,6 +560,8 @@ class ClientSocketPoolBase {
return helper_->CleanupIdleSockets(force);
}
+ void enable_backup_jobs() { helper_->enable_backup_jobs(); };
+
private:
// This adaptor class exists to bridge the
// internal::ClientSocketPoolBaseHelper::ConnectJobFactory and
« 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