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

Unified Diff: net/http/http_network_session.cc

Issue 149027: Limit total number of sockets in the system.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: reorder Created 11 years, 5 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/http/http_network_session.h ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_session.cc
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index a498ed08956d3d60452b952453b01d022977e325..b70576653b512961dc52b6ca689f863136a04bf2 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -9,8 +9,23 @@
namespace net {
// static
+int HttpNetworkSession::max_sockets_ = 100;
+
+// static
int HttpNetworkSession::max_sockets_per_group_ = 6;
+HttpNetworkSession::HttpNetworkSession(
+ HostResolver* host_resolver,
+ ProxyService* proxy_service,
+ ClientSocketFactory* client_socket_factory)
+ : connection_pool_(new TCPClientSocketPool(
+ max_sockets_, max_sockets_per_group_, host_resolver,
+ client_socket_factory)),
+ host_resolver_(host_resolver),
+ proxy_service_(proxy_service) {
+ DCHECK(proxy_service);
+}
+
// static
void HttpNetworkSession::set_max_sockets_per_group(int socket_count) {
DCHECK(0 < socket_count);
« no previous file with comments | « net/http/http_network_session.h ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698