summaryrefslogtreecommitdiffstats
path: root/chrome/browser/io_thread.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-20 16:32:32 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-20 16:32:32 +0000
commitdf2840d7c9c0e7a2ac4a167e4d9de254ae9fab11 (patch)
tree7a461519d28df2dfd3fc8f1679cc073016c9adc6 /chrome/browser/io_thread.cc
parent1b770e7eef5f6a5ba50c21c6f294c4e78393dbb2 (diff)
downloadchromium_src-df2840d7c9c0e7a2ac4a167e4d9de254ae9fab11.zip
chromium_src-df2840d7c9c0e7a2ac4a167e4d9de254ae9fab11.tar.gz
chromium_src-df2840d7c9c0e7a2ac4a167e4d9de254ae9fab11.tar.bz2
When user "discards history," discard speculative data as well
The speculative system record the first 10 connections that are made (at startup), and also learns about subresource connections made when the user visits sites. This information implies visitation history, and needs to be discarded when the user BUG=62891 r=eroman,sky Review URL: http://codereview.chromium.org/6538007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r--chrome/browser/io_thread.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 16eec12..2a854b8 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -15,6 +15,7 @@
#include "base/string_split.h"
#include "base/string_util.h"
#include "base/threading/thread_restrictions.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/gpu_process_host.h"
#include "chrome/browser/in_process_webkit/indexed_db_key_utility_client.h"
@@ -295,6 +296,15 @@ void IOThread::ChangedToOnTheRecord() {
&IOThread::ChangedToOnTheRecordOnIOThread));
}
+void IOThread::ClearNetworkingHistory() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ ClearHostCache();
+ // Discard acrued data used to speculate in the future.
+ chrome_browser_net::DiscardInitialNavigationHistory();
+ if (predictor_)
+ predictor_->DiscardAllResults();
+}
+
void IOThread::Init() {
// Though this thread is called the "IO" thread, it actually just routes
// messages around; it shouldn't be allowed to perform any blocking disk I/O.
@@ -496,6 +506,7 @@ void IOThread::ChangedToOnTheRecordOnIOThread() {
if (predictor_) {
// Destroy all evidence of our OTR session.
+ // Note: OTR mode never saves InitialNavigationHistory data.
predictor_->Predictor::DiscardAllResults();
}