diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 19:59:36 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 19:59:36 +0000 |
commit | 60c4c41ce3ed1fa0697daf274233d84febf6233c (patch) | |
tree | 7b6bfe29f7b6526b4c63ce49ab7a7ffcd20d3bbf /net/proxy/proxy_service.cc | |
parent | 3203c5e35bba5266fe1d149875c3a9815ee9c214 (diff) | |
download | chromium_src-60c4c41ce3ed1fa0697daf274233d84febf6233c.zip chromium_src-60c4c41ce3ed1fa0697daf274233d84febf6233c.tar.gz chromium_src-60c4c41ce3ed1fa0697daf274233d84febf6233c.tar.bz2 |
Improve the display of LoadLogs when truncation occurs.
Rather than drop all subsequent entries, we now preserve the final entry that was appended to the log.
This way, even if entries have been dropped, we can still infer what the total time was, and what the exit condition was.
Also makes LoadLog take the bound as a required parameter.
BUG=none
TEST=LoadLogUtilTest.DisplayOfTruncated
Review URL: http://codereview.chromium.org/363025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31274 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_service.cc')
-rw-r--r-- | net/proxy/proxy_service.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc index 91a6133..0177b75 100644 --- a/net/proxy/proxy_service.cc +++ b/net/proxy/proxy_service.cc @@ -36,6 +36,8 @@ using base::TimeTicks; namespace net { +static const size_t kMaxNumLoadLogEntries = 100; + // Config getter that fails every time. class ProxyConfigServiceNull : public ProxyConfigService { public: @@ -630,7 +632,7 @@ void ProxyService::SetConfig(const ProxyConfig& config) { init_proxy_resolver_.reset( new InitProxyResolver(resolver_.get(), proxy_script_fetcher_.get())); - init_proxy_resolver_log_ = new LoadLog; + init_proxy_resolver_log_ = new LoadLog(kMaxNumLoadLogEntries); int rv = init_proxy_resolver_->Init( config_, &init_proxy_resolver_callback_, init_proxy_resolver_log_); |