summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 22:55:46 +0000
committerziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 22:55:46 +0000
commitbba3823dbc18cb50d6c43a9777f21f052b81dca7 (patch)
treeff838850ac8e6b8b7fc0cbdd2aac7d60caee0357 /net/http
parent27c2e49c1fb5ea3869fce54c4ff49a674f842173 (diff)
downloadchromium_src-bba3823dbc18cb50d6c43a9777f21f052b81dca7.zip
chromium_src-bba3823dbc18cb50d6c43a9777f21f052b81dca7.tar.gz
chromium_src-bba3823dbc18cb50d6c43a9777f21f052b81dca7.tar.bz2
Bad interaction between 2 A/B experiments
There is a 1/20 chance that the max number of sockets per group be greater than the max number of sockets per proxy server. This would result in hitting a DCHECK in client_socket_pool_base.cc:145. This CL attempts to circumvent that event. r=jar Review URL: http://codereview.chromium.org/3044051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_network_session.cc9
-rw-r--r--net/http/http_network_session.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 204c46a..e49d66b 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -138,6 +138,11 @@ HttpNetworkSession::GetSocketPoolForSSLWithProxy(
}
// static
+int HttpNetworkSession::max_sockets_per_group() {
+ return g_max_sockets_per_group;
+}
+
+// static
void HttpNetworkSession::set_max_sockets_per_group(int socket_count) {
DCHECK_LT(0, socket_count);
// The following is a sanity check... but we should NEVER be near this value.
@@ -149,7 +154,9 @@ void HttpNetworkSession::set_max_sockets_per_group(int socket_count) {
void HttpNetworkSession::set_max_sockets_per_proxy_server(int socket_count) {
DCHECK_LT(0, socket_count);
DCHECK_GT(100, socket_count); // Sanity check.
-
+ // Assert this case early on. The max number of sockets per group cannot
+ // exceed the max number of sockets per proxy server.
+ DCHECK_LE(g_max_sockets_per_group, socket_count);
g_max_sockets_per_proxy_server = socket_count;
}
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index fdda68d..650a831 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -101,6 +101,7 @@ class HttpNetworkSession : public base::RefCounted<HttpNetworkSession>,
return network_delegate_;
}
+ static int max_sockets_per_group();
static void set_max_sockets_per_group(int socket_count);
static void set_max_sockets_per_proxy_server(int socket_count);