summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 19:13:08 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 19:13:08 +0000
commit8d53d50afb7ed6df2a39c175bfdb2485a3a25d9d (patch)
treeeab27a8ece609f3bd6fad7081cbf5fd36ec0922f /chrome/browser/browser_main.cc
parent762d2db5d5e1b0d7852ddb2efef982b00e897322 (diff)
downloadchromium_src-8d53d50afb7ed6df2a39c175bfdb2485a3a25d9d.zip
chromium_src-8d53d50afb7ed6df2a39c175bfdb2485a3a25d9d.tar.gz
chromium_src-8d53d50afb7ed6df2a39c175bfdb2485a3a25d9d.tar.bz2
Clear the host cache when closing the last incognito window.
This avoids retaining navigation history relating to the incognito window. I piggy-back off of the dns prefetcher's OffTheRecordObserver to do this. In the future I hope to have a separate host resolver for off the record mode, so this won't be necessary. BUG=24629 Review URL: http://codereview.chromium.org/523076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 521513f..0c57f3a 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -762,8 +762,9 @@ int BrowserMain(const MainFunctionParams& parameters) {
// testing against a bunch of special cases that are taken care early on.
PrepareRestartOnCrashEnviroment(parsed_command_line);
- // Initialize and maintain DNS prefetcher module.
- chrome_browser_net::DnsPrefetcherInit dns_prefetch(user_prefs, local_state);
+ // Initialize and maintain DNS prefetcher module. Also registers an observer
+ // to clear the host cache when closing incognito mode.
+ chrome_browser_net::DnsGlobalInit dns_prefetch(user_prefs, local_state);
scoped_refptr<FieldTrial> socket_late_binding_trial =
new FieldTrial("SocketLateBinding", 100);