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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 10447117: Unwire the clear on exit preference from the storage systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 7 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 0612b8214d5072961aa40a0fdb14133a63c53efd..ba2e92d5ea06f8e5134aff670067544f5841f3a5 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -205,9 +205,6 @@ void ProfileImpl::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled,
false,
PrefService::UNSYNCABLE_PREF);
- prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit,
- false,
- PrefService::SYNCABLE_PREF);
prefs->RegisterBooleanPref(prefs::kProfileShortcutCreated,
false,
PrefService::UNSYNCABLE_PREF);
@@ -220,6 +217,11 @@ void ProfileImpl::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kRestoreSessionStateDialogShown,
false,
PrefService::SYNCABLE_PREF);
+
+ // Deprecated. Kept around for migration.
+ prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit,
+ false,
+ PrefService::SYNCABLE_PREF);
}
ProfileImpl::ProfileImpl(const FilePath& path,
@@ -232,7 +234,6 @@ ProfileImpl::ProfileImpl(const FilePath& path,
host_content_settings_map_(NULL),
history_service_created_(false),
favicon_service_created_(false),
- clear_local_state_on_exit_(false),
start_time_(Time::Now()),
delegate_(delegate),
predictor_(NULL),
@@ -290,7 +291,6 @@ void ProfileImpl::DoFinalInit(bool is_new_profile) {
PrefService* prefs = GetPrefs();
pref_change_registrar_.Init(prefs);
pref_change_registrar_.Add(prefs::kSpeechRecognitionFilterProfanities, this);
- pref_change_registrar_.Add(prefs::kClearSiteDataOnExit, this);
pref_change_registrar_.Add(prefs::kGoogleServicesUsername, this);
pref_change_registrar_.Add(prefs::kDefaultZoomLevel, this);
pref_change_registrar_.Add(prefs::kProfileAvatarIndex, this);
@@ -339,15 +339,6 @@ void ProfileImpl::DoFinalInit(bool is_new_profile) {
InitRegisteredProtocolHandlers();
- clear_local_state_on_exit_ = prefs->GetBoolean(prefs::kClearSiteDataOnExit);
- if (clear_local_state_on_exit_) {
- content::RecordAction(
- UserMetricsAction("ClearSiteDataOnExitEnabled"));
- } else {
- content::RecordAction(
- UserMetricsAction("ClearSiteDataOnExitDisabled"));
- }
-
InstantController::RecordMetrics(this);
FilePath cookie_path = GetPath();
@@ -494,9 +485,6 @@ ProfileImpl::~ProfileImpl() {
content::NotificationService::NoDetails());
bool prefs_loaded = prefs_->GetInitializationStatus() !=
PrefService::INITIALIZATION_STATUS_WAITING;
- // Honor the "clear local state" setting.
- if (clear_local_state_on_exit_)
- BrowserContext::ClearLocalOnDestruction(this);
#if defined(ENABLE_SESSION_SERVICE)
StopCreateSessionServiceTimer();
@@ -929,9 +917,6 @@ void ProfileImpl::Observe(int type,
speech_prefs->SetFilterProfanities(prefs->GetBoolean(
prefs::kSpeechRecognitionFilterProfanities));
}
- } else if (*pref_name_in == prefs::kClearSiteDataOnExit) {
- clear_local_state_on_exit_ =
- prefs->GetBoolean(prefs::kClearSiteDataOnExit);
} else if (*pref_name_in == prefs::kGoogleServicesUsername) {
UpdateProfileUserNameCache();
} else if (*pref_name_in == prefs::kProfileAvatarIndex) {

Powered by Google App Engine
This is Rietveld 408576698