summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 20:27:02 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 20:27:02 +0000
commit970210cdcd03803acfe9f08bfa20edb5e84f07ce (patch)
treef45d20277969a6b33b27194e7604de9419ff67bb /chrome
parentfc9023fa5d45af40509a20263142ad7191620e00 (diff)
downloadchromium_src-970210cdcd03803acfe9f08bfa20edb5e84f07ce.zip
chromium_src-970210cdcd03803acfe9f08bfa20edb5e84f07ce.tar.gz
chromium_src-970210cdcd03803acfe9f08bfa20edb5e84f07ce.tar.bz2
Make MappedHostResolver display its internals on the about:net-internals page (so use of the --host-resolver-rules flag doesn't limit features), and run through the Shutdown() method on exit.
This reworks the "IsHostResolverImpl()" hack to be a bit more general. BUG=36053 Review URL: http://codereview.chromium.org/646003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39488 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/io_thread.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 4ee6814..f4d4698 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -153,9 +153,8 @@ void IOThread::CleanUp() {
}
// TODO(eroman): hack for http://crbug.com/15513
- if (globals_->host_resolver->IsHostResolverImpl()) {
- static_cast<net::HostResolverImpl*>(
- globals_->host_resolver.get())->Shutdown();
+ if (globals_->host_resolver->GetAsHostResolverImpl()) {
+ globals_->host_resolver.get()->GetAsHostResolverImpl()->Shutdown();
}
delete globals_;
@@ -210,9 +209,9 @@ void IOThread::ChangedToOnTheRecordOnIOThread() {
// Clear the host cache to avoid showing entries from the OTR session
// in about:net-internals.
- if (globals_->host_resolver->IsHostResolverImpl()) {
- net::HostCache* host_cache = static_cast<net::HostResolverImpl*>(
- globals_->host_resolver.get())->cache();
+ if (globals_->host_resolver->GetAsHostResolverImpl()) {
+ net::HostCache* host_cache =
+ globals_->host_resolver.get()->GetAsHostResolverImpl()->cache();
if (host_cache)
host_cache->clear();
}