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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/browser/background/background_contents_service_factory.h" 16 #include "chrome/browser/background/background_contents_service_factory.h"
17 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/chrome_plugin_service_filter.h" 18 #include "chrome/browser/chrome_plugin_service_filter.h"
19 #include "chrome/browser/content_settings/host_content_settings_map.h" 19 #include "chrome/browser/content_settings/host_content_settings_map.h"
20 #include "chrome/browser/download/download_service.h" 20 #include "chrome/browser/download/download_service.h"
21 #include "chrome/browser/download/download_service_factory.h" 21 #include "chrome/browser/download/download_service_factory.h"
22 #include "chrome/browser/extensions/extension_info_map.h" 22 #include "chrome/browser/extensions/extension_info_map.h"
23 #include "chrome/browser/extensions/extension_message_service.h" 23 #include "chrome/browser/extensions/extension_message_service.h"
24 #include "chrome/browser/extensions/extension_pref_store.h" 24 #include "chrome/browser/extensions/extension_pref_store.h"
25 #include "chrome/browser/extensions/extension_process_manager.h" 25 #include "chrome/browser/extensions/extension_process_manager.h"
26 #include "chrome/browser/extensions/extension_service.h" 26 #include "chrome/browser/extensions/extension_service.h"
27 #include "chrome/browser/extensions/extension_special_storage_policy.h" 27 #include "chrome/browser/extensions/extension_special_storage_policy.h"
28 #include "chrome/browser/extensions/extension_webrequest_api.h" 28 #include "chrome/browser/extensions/extension_webrequest_api.h"
29 #include "chrome/browser/io_thread.h"
29 #include "chrome/browser/net/proxy_service_factory.h" 30 #include "chrome/browser/net/proxy_service_factory.h"
30 #include "chrome/browser/plugin_prefs.h" 31 #include "chrome/browser/plugin_prefs.h"
31 #include "chrome/browser/prefs/incognito_mode_prefs.h" 32 #include "chrome/browser/prefs/incognito_mode_prefs.h"
32 #include "chrome/browser/prefs/pref_service.h" 33 #include "chrome/browser/prefs/pref_service.h"
33 #include "chrome/browser/profiles/profile_dependency_manager.h" 34 #include "chrome/browser/profiles/profile_dependency_manager.h"
34 #include "chrome/browser/sync/profile_sync_service.h" 35 #include "chrome/browser/sync/profile_sync_service.h"
35 #include "chrome/browser/themes/theme_service.h" 36 #include "chrome/browser/themes/theme_service.h"
36 #include "chrome/browser/transport_security_persister.h" 37 #include "chrome/browser/transport_security_persister.h"
37 #include "chrome/browser/ui/find_bar/find_bar_state.h" 38 #include "chrome/browser/ui/find_bar/find_bar_state.h"
38 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 39 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 host_content_settings_map_->ShutdownOnUIThread(); 148 host_content_settings_map_->ShutdownOnUIThread();
148 149
149 if (pref_proxy_config_tracker_.get()) 150 if (pref_proxy_config_tracker_.get())
150 pref_proxy_config_tracker_->DetachFromPrefService(); 151 pref_proxy_config_tracker_->DetachFromPrefService();
151 152
152 ExtensionService* extension_service = GetExtensionService(); 153 ExtensionService* extension_service = GetExtensionService();
153 if (extension_service) { 154 if (extension_service) {
154 ExtensionPrefs* extension_prefs = extension_service->extension_prefs(); 155 ExtensionPrefs* extension_prefs = extension_service->extension_prefs();
155 extension_prefs->ClearIncognitoSessionOnlyContentSettings(); 156 extension_prefs->ClearIncognitoSessionOnlyContentSettings();
156 } 157 }
158
159 // Clears any data the network stack contains that may be related to the
160 // OTR session.
161 g_browser_process->io_thread()->ChangedToOnTheRecord();
157 } 162 }
158 163
159 std::string OffTheRecordProfileImpl::GetProfileName() { 164 std::string OffTheRecordProfileImpl::GetProfileName() {
160 // Incognito profile should not return the profile name. 165 // Incognito profile should not return the profile name.
161 return std::string(); 166 return std::string();
162 } 167 }
163 168
164 FilePath OffTheRecordProfileImpl::GetPath() { 169 FilePath OffTheRecordProfileImpl::GetPath() {
165 return profile_->GetPath(); 170 return profile_->GetPath();
166 } 171 }
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 OffTheRecordProfileImpl* profile = NULL; 665 OffTheRecordProfileImpl* profile = NULL;
661 #if defined(OS_CHROMEOS) 666 #if defined(OS_CHROMEOS)
662 if (Profile::IsGuestSession()) 667 if (Profile::IsGuestSession())
663 profile = new GuestSessionProfile(this); 668 profile = new GuestSessionProfile(this);
664 #endif 669 #endif
665 if (!profile) 670 if (!profile)
666 profile = new OffTheRecordProfileImpl(this); 671 profile = new OffTheRecordProfileImpl(this);
667 profile->Init(); 672 profile->Init();
668 return profile; 673 return profile;
669 } 674 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698