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)); |