diff options
author | chase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 00:55:28 +0000 |
---|---|---|
committer | chase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 00:55:28 +0000 |
commit | 59395014c0ac449ba9b8273800aa09965d36412c (patch) | |
tree | 99899218bc1310de33c9ecf0298a1b15c04ea8b5 /chrome/browser/browser_process_impl.cc | |
parent | 4303f91082840584199e9b79e99b6d0181ca3871 (diff) | |
download | chromium_src-59395014c0ac449ba9b8273800aa09965d36412c.zip chromium_src-59395014c0ac449ba9b8273800aa09965d36412c.tar.gz chromium_src-59395014c0ac449ba9b8273800aa09965d36412c.tar.bz2 |
Revert 37913 - Clear local state (cookies, databases, local storage) on exit.
BUG=32719
TEST=none
Review URL: http://codereview.chromium.org/564012
TBR=jochen@chromium.org
Review URL: http://codereview.chromium.org/564023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37915 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index f58357b..a63f6a4 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -21,13 +21,11 @@ #include "chrome/browser/download/save_file_manager.h" #include "chrome/browser/google_url_tracker.h" #include "chrome/browser/icon_manager.h" -#include "chrome/browser/in_process_webkit/dom_storage_context.h" #include "chrome/browser/intranet_redirect_detector.h" #include "chrome/browser/io_thread.h" #include "chrome/browser/metrics/metrics_service.h" #include "chrome/browser/net/dns_global.h" #include "chrome/browser/net/sdch_dictionary_fetcher.h" -#include "chrome/browser/net/sqlite_persistent_cookie_store.h" #include "chrome/browser/notifications/notification_ui_manager.h" #include "chrome/browser/plugin_service.h" #include "chrome/browser/profile_manager.h" @@ -35,15 +33,12 @@ #include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/common/child_process_host.h" -#include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" -#include "chrome/common/url_constants.h" #include "ipc/ipc_logging.h" -#include "webkit/database/database_tracker.h" #if defined(OS_WIN) #include "views/focus/view_storage.h" @@ -93,12 +88,6 @@ BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line) } BrowserProcessImpl::~BrowserProcessImpl() { - FilePath profile_path; - bool clear_local_state_on_exit; - - // Store the profile path for clearing local state data on exit. - clear_local_state_on_exit = ShouldClearLocalState(&profile_path); - // Delete the AutomationProviderList before NotificationService, // since it may try to unregister notifications // Both NotificationService and AutomationProvider are singleton instances in @@ -164,11 +153,6 @@ BrowserProcessImpl::~BrowserProcessImpl() { // SaveFileManager and SessionService. file_thread_.reset(); - // At this point, no render process exist, so it's safe to access local - // state data such as cookies, database, or local storage. - if (clear_local_state_on_exit) - ClearLocalState(profile_path); - // With the file_thread_ flushed, we can release any icon resources. icon_manager_.reset(); @@ -248,25 +232,6 @@ printing::PrintJobManager* BrowserProcessImpl::print_job_manager() { return print_job_manager_.get(); } -void BrowserProcessImpl::ClearLocalState(const FilePath& profile_path) { - SQLitePersistentCookieStore::ClearLocalState(profile_path.Append( - chrome::kCookieFilename)); - DOMStorageContext::ClearLocalState(profile_path, chrome::kExtensionScheme); - webkit_database::DatabaseTracker::ClearLocalState(profile_path, - chrome::kExtensionScheme); - // TODO(jochen): clear app cache local state. -} - -bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { - FilePath user_data_dir; - Profile* profile; - - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); - profile = profile_manager_->GetDefaultProfile(user_data_dir); - *profile_path = profile->GetPath(); - return profile->GetPrefs()->GetBoolean(prefs::kClearSiteDataOnExit); -} - void BrowserProcessImpl::CreateResourceDispatcherHost() { DCHECK(!created_resource_dispatcher_host_ && resource_dispatcher_host_.get() == NULL); |