summaryrefslogtreecommitdiffstats
path: root/chrome/browser/io_thread.cc
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-13 23:58:41 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-13 23:58:41 +0000
commitd6f37fc1f47caa6d8c633ffad1ea4b259b25fdb9 (patch)
treed4749631035a96dd677653d6870d7ba950c1b7d6 /chrome/browser/io_thread.cc
parente0b18175c58d33966979784c4e1652c9a8381f14 (diff)
downloadchromium_src-d6f37fc1f47caa6d8c633ffad1ea4b259b25fdb9.zip
chromium_src-d6f37fc1f47caa6d8c633ffad1ea4b259b25fdb9.tar.gz
chromium_src-d6f37fc1f47caa6d8c633ffad1ea4b259b25fdb9.tar.bz2
Fix privacy issues related to about:net-internals and about:dns
and clearing the history. When clearing the history, both NetLog and the host cache are now cleared. BUG=65338 TEST=none Review URL: http://codereview.chromium.org/6312076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r--chrome/browser/io_thread.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index bc374b2..c6b8c7b 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -500,14 +500,21 @@ void IOThread::ChangedToOnTheRecordOnIOThread() {
// Clear the host cache to avoid showing entries from the OTR session
// in about:net-internals.
+ ClearHostCache();
+
+ // Clear all of the passively logged data.
+ // TODO(eroman): this is a bit heavy handed, really all we need to do is
+ // clear the data pertaining to off the record context.
+ net_log_->ClearAllPassivelyCapturedEvents();
+}
+
+void IOThread::ClearHostCache() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+
if (globals_->host_resolver->GetAsHostResolverImpl()) {
net::HostCache* host_cache =
globals_->host_resolver.get()->GetAsHostResolverImpl()->cache();
if (host_cache)
host_cache->clear();
}
- // Clear all of the passively logged data.
- // TODO(eroman): this is a bit heavy handed, really all we need to do is
- // clear the data pertaining to off the record context.
- net_log_->ClearAllPassivelyCapturedEvents();
}