diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-24 05:28:20 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-24 05:28:20 +0000 |
commit | 029c83b673fd8dbe900e9b06c92c79e0dcf329d1 (patch) | |
tree | b98ba82c877aa17a35cddbeb3b15e965e6e1e26b /net/proxy/proxy_service.cc | |
parent | 44703cc73a24cc39b3e5e832f447d8261701fa4c (diff) | |
download | chromium_src-029c83b673fd8dbe900e9b06c92c79e0dcf329d1.zip chromium_src-029c83b673fd8dbe900e9b06c92c79e0dcf329d1.tar.gz chromium_src-029c83b673fd8dbe900e9b06c92c79e0dcf329d1.tar.bz2 |
LoadTiming in net part 4.
Add proxy resolution timing support.
Also document a few weird behaviors.
R=eroman@chromium.org
BUG=77446
Review URL: https://codereview.chromium.org/12047032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_service.cc')
-rw-r--r-- | net/proxy/proxy_service.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc index 17e46ed..55088f3 100644 --- a/net/proxy/proxy_service.cc +++ b/net/proxy/proxy_service.cc @@ -724,10 +724,10 @@ class ProxyService::PacRequest : public base::RefCounted<ProxyService::PacRequest> { public: PacRequest(ProxyService* service, - const GURL& url, - ProxyInfo* results, - const net::CompletionCallback& user_callback, - const BoundNetLog& net_log) + const GURL& url, + ProxyInfo* results, + const net::CompletionCallback& user_callback, + const BoundNetLog& net_log) : service_(service), user_callback_(user_callback), results_(results), @@ -748,6 +748,7 @@ class ProxyService::PacRequest config_id_ = service_->config_.id(); config_source_ = service_->config_.source(); + proxy_resolve_start_time_ = TimeTicks::Now(); return resolver()->GetProxyForURL( url_, results_, @@ -808,6 +809,8 @@ class ProxyService::PacRequest results_->config_id_ = config_id_; results_->config_source_ = config_source_; results_->did_use_pac_script_ = true; + results_->proxy_resolve_start_time_ = proxy_resolve_start_time_; + results_->proxy_resolve_end_time_ = TimeTicks::Now(); // Reset the state associated with in-progress-resolve. resolve_job_ = NULL; @@ -856,6 +859,9 @@ class ProxyService::PacRequest ProxyConfig::ID config_id_; // The config id when the resolve was started. ProxyConfigSource config_source_; // The source of proxy settings. BoundNetLog net_log_; + // Time when the PAC is started. Cached here since resetting ProxyInfo also + // clears the proxy times. + TimeTicks proxy_resolve_start_time_; }; // ProxyService --------------------------------------------------------------- |