Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4754)

Unified Diff: chrome/browser/io_thread.cc

Issue 8775067: Clear DNS cache and passive log collected on incognito close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/io_thread.cc
===================================================================
--- chrome/browser/io_thread.cc (revision 112237)
+++ chrome/browser/io_thread.cc (working copy)
@@ -394,6 +394,14 @@
return net_log_;
}
+void IOThread::ChangedToOnTheRecord() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ message_loop()->PostTask(
+ FROM_HERE,
+ base::Bind(&IOThread::ChangedToOnTheRecordOnIOThread,
+ base::Unretained(this)));
+}
+
net::URLRequestContextGetter* IOThread::system_url_request_context_getter() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!system_url_request_context_getter_) {
@@ -580,6 +588,19 @@
negotiate_enable_port_);
}
+void IOThread::ChangedToOnTheRecordOnIOThread() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+
+ // 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 incognito context.
+ net_log_->ClearAllPassivelyCapturedEvents();
+}
+
void IOThread::ClearHostCache() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));

Powered by Google App Engine
This is Rietveld 408576698