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) { |