diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-08 14:53:38 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-08 14:53:38 +0000 |
commit | ba00b49d134df5d468ddd62d21ab33d7401b59fa (patch) | |
tree | 23eacf227cedb4f76affd0f4c08d31be889a24bd /net/http/http_proxy_client_socket_pool.cc | |
parent | 0982e5893e97489a3c9038e5d957b1403d6a62c1 (diff) | |
download | chromium_src-ba00b49d134df5d468ddd62d21ab33d7401b59fa.zip chromium_src-ba00b49d134df5d468ddd62d21ab33d7401b59fa.tar.gz chromium_src-ba00b49d134df5d468ddd62d21ab33d7401b59fa.tar.bz2 |
Add missing nested socket pools to socket pool info page. Each socket pool should be displayed once and only once. Also, if more than one proxy is in use, socket pools with the same proxy will appear adjacent to each other.
BUG=39756
TEST=manual
Review URL: http://codereview.chromium.org/3328009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_proxy_client_socket_pool.cc')
-rw-r--r-- | net/http/http_proxy_client_socket_pool.cc | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc index f11ad30..b89e102 100644 --- a/net/http/http_proxy_client_socket_pool.cc +++ b/net/http/http_proxy_client_socket_pool.cc @@ -7,6 +7,7 @@ #include <algorithm> #include "base/time.h" +#include "base/values.h" #include "googleurl/src/gurl.h" #include "net/base/load_flags.h" #include "net/base/net_errors.h" @@ -268,7 +269,9 @@ HttpProxyClientSocketPool::HttpProxyClientSocketPool( const scoped_refptr<TCPClientSocketPool>& tcp_pool, const scoped_refptr<SSLClientSocketPool>& ssl_pool, NetLog* net_log) - : base_(max_sockets, max_sockets_per_group, histograms, + : tcp_pool_(tcp_pool), + ssl_pool_(ssl_pool), + base_(max_sockets, max_sockets_per_group, histograms, base::TimeDelta::FromSeconds( ClientSocketPool::unused_idle_socket_timeout()), base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), @@ -319,4 +322,26 @@ LoadState HttpProxyClientSocketPool::GetLoadState( return base_.GetLoadState(group_name, handle); } +DictionaryValue* HttpProxyClientSocketPool::GetInfoAsValue( + const std::string& name, + const std::string& type, + bool include_nested_pools) const { + DictionaryValue* dict = base_.GetInfoAsValue(name, type); + if (include_nested_pools) { + ListValue* list = new ListValue(); + if (tcp_pool_.get()) { + list->Append(tcp_pool_->GetInfoAsValue("tcp_socket_pool", + "tcp_socket_pool", + true)); + } + if (ssl_pool_.get()) { + list->Append(ssl_pool_->GetInfoAsValue("ssl_socket_pool", + "ssl_socket_pool", + true)); + } + dict->Set("nested_pools", list); + } + return dict; +} + } // namespace net |