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

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: Remove call to IOThread::message_loop() 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
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/profiles/off_the_record_profile_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
===================================================================
--- chrome/browser/io_thread.cc (revision 112998)
+++ chrome/browser/io_thread.cc (working copy)
@@ -395,6 +395,15 @@
return net_log_;
}
+void IOThread::ChangedToOnTheRecord() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BrowserThread::PostTask(
+ BrowserThread::IO,
+ 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_) {
@@ -593,6 +602,19 @@
return ssl_config_service_manager_->Get();
}
+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::InitSystemRequestContext() {
if (system_url_request_context_getter_)
return;
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/profiles/off_the_record_profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698