diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 00:56:35 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 00:56:35 +0000 |
commit | f2d8c4217a9214d12385ca43e2b22fd691a4f47a (patch) | |
tree | ae124579efa80bfc69ccf36f05fef865027ca277 /chrome/browser/io_thread.cc | |
parent | 32f076f65de1d1e40b462a6a704b27b34a9725ca (diff) | |
download | chromium_src-f2d8c4217a9214d12385ca43e2b22fd691a4f47a.zip chromium_src-f2d8c4217a9214d12385ca43e2b22fd691a4f47a.tar.gz chromium_src-f2d8c4217a9214d12385ca43e2b22fd691a4f47a.tar.bz2 |
Add fine grain tracing to HostResolverImpl.
This will help in diagnosing the "slow resolving host" bugs.
Users can now click an "Enable tracing" button on "chrome://net-internals/hostresolver".
This logs detailed information on the DNS requests flowing through the browser (when they were received, when they were posted to the thread pool, when they started running on the worker thread, etc...).
BUG=12754
Review URL: http://codereview.chromium.org/556094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37776 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r-- | chrome/browser/io_thread.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 5625117..82e2f50 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -14,6 +14,7 @@ #include "net/base/fixed_host_resolver.h" #include "net/base/host_cache.h" #include "net/base/host_resolver.h" +#include "net/base/host_resolver_impl.h" #include "net/url_request/url_request.h" namespace { @@ -177,7 +178,10 @@ void IOThread::ChangedToOnTheRecordOnIOThread() { // Clear the host cache to avoid showing entries from the OTR session // in about:net-internals. - net::HostCache* host_cache = host_resolver_->GetHostCache(); - if (host_cache) - host_cache->clear(); + if (host_resolver_->IsHostResolverImpl()) { + net::HostCache* host_cache = static_cast<net::HostResolverImpl*>( + host_resolver_)->cache(); + if (host_cache) + host_cache->clear(); + } } |