diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 17:17:26 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 17:17:26 +0000 |
commit | a796bcec176ca3875a55346800b3a60a83e2dd89 (patch) | |
tree | 2533c17673ff50f4f101e803c2dff3bf8f5cbf7b /net/http/http_network_session.cc | |
parent | 35818452760c23c570b7947e00a3b38e733ce58e (diff) | |
download | chromium_src-a796bcec176ca3875a55346800b3a60a83e2dd89.zip chromium_src-a796bcec176ca3875a55346800b3a60a83e2dd89.tar.gz chromium_src-a796bcec176ca3875a55346800b3a60a83e2dd89.tar.bz2 |
Implement SOCKSClientSocketPool
This is the first layered pool, so there are several infrastructure changes in this change as well.
Add a ConnectionTimeout method to pools so that layered pools can timeout each phase.
Add a name method to pools to support per pool UMA histograms.
Change SOCKS sockets to take a ClientSocketHandle instead of a ClientSocket
BUG=30357 (blocks an SSL Pool)
TEST=existing unit tests
Review URL: http://codereview.chromium.org/668097
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_session.cc')
-rw-r--r-- | net/http/http_network_session.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc index 79af40f..d7dbe94 100644 --- a/net/http/http_network_session.cc +++ b/net/http/http_network_session.cc @@ -20,6 +20,8 @@ int HttpNetworkSession::max_sockets_per_group_ = 6; uint16 HttpNetworkSession::g_fixed_http_port = 0; uint16 HttpNetworkSession::g_fixed_https_port = 0; +// TODO(vandebo) when we've completely converted to pools, the base TCP +// pool name should get changed to TCP instead of Transport. HttpNetworkSession::HttpNetworkSession( NetworkChangeNotifier* network_change_notifier, HostResolver* host_resolver, @@ -30,8 +32,15 @@ HttpNetworkSession::HttpNetworkSession( HttpAuthHandlerFactory* http_auth_handler_factory) : network_change_notifier_(network_change_notifier), tcp_socket_pool_(new TCPClientSocketPool( - max_sockets_, max_sockets_per_group_, + max_sockets_, max_sockets_per_group_, "Transport", host_resolver, client_socket_factory, network_change_notifier_)), + socks_socket_pool_(new SOCKSClientSocketPool( + max_sockets_, max_sockets_per_group_, "SOCKS", host_resolver, + new TCPClientSocketPool(max_sockets_, max_sockets_per_group_, + "TCPForSOCKS", host_resolver, + client_socket_factory, + network_change_notifier_), + network_change_notifier_)), socket_factory_(client_socket_factory), host_resolver_(host_resolver), proxy_service_(proxy_service), @@ -53,9 +62,12 @@ void HttpNetworkSession::set_max_sockets_per_group(int socket_count) { max_sockets_per_group_ = socket_count; } +// TODO(vandebo) when we've completely converted to pools, the base TCP +// pool name should get changed to TCP instead of Transport. void HttpNetworkSession::ReplaceTCPSocketPool() { tcp_socket_pool_ = new TCPClientSocketPool(max_sockets_, max_sockets_per_group_, + "Transport", host_resolver_, socket_factory_, network_change_notifier_); |