summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormmenke <mmenke@chromium.org>2015-07-20 11:55:24 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-20 18:56:04 +0000
commitdda044e7fef4b17eea9596022e724ea3800f1d66 (patch)
tree5c42450802137a66f23e803f2d77186e144c4e50 /net
parent784dc439e23bcafaa7f838a1ad74aaae2dc213d5 (diff)
downloadchromium_src-dda044e7fef4b17eea9596022e724ea3800f1d66.zip
chromium_src-dda044e7fef4b17eea9596022e724ea3800f1d66.tar.gz
chromium_src-dda044e7fef4b17eea9596022e724ea3800f1d66.tar.bz2
Disable socket cleanup timer everywhere but Windows.
This is done on all platforms except Windows, since XP may have issues otherwise. Sockets will be now closed only when new sockets are requested from the socket pool, which should hopefully reduce idle power usage. This CL also disables preconnect in ChromeActivityTestCaseBase. Some of those tests use TestServer.java, which is a single-threaded test server that is preconnect-intolerant. We already do the same for the test fixture used for BrowserTests. BUG=504095 Review URL: https://codereview.chromium.org/1233593005 Cr-Commit-Position: refs/heads/master@{#339478}
Diffstat (limited to 'net')
-rw-r--r--net/socket/client_socket_pool_base.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index a42dfd4..29de892 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -27,7 +27,13 @@ namespace {
// Indicate whether we should enable idle socket cleanup timer. When timer is
// disabled, sockets are closed next time a socket request is made.
+// Keep this enabled for windows as long as we support Windows XP, see the note
+// in kCleanupInterval below.
+#if defined(OS_WIN)
bool g_cleanup_timer_enabled = true;
+#else
+bool g_cleanup_timer_enabled = false;
+#endif
// The timeout value, in seconds, used to clean up idle sockets that can't be
// reused.