Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index b8cf237c6630778916cbae3bbc84e0d1d5fe80c2..879e0e1e576206bcb7303c5a2f6e6dcd568eb0b4 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -199,9 +199,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); |
@@ -214,6 +211,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, |
@@ -226,7 +228,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), |
@@ -276,7 +277,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); |
@@ -325,15 +325,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(); |
@@ -480,9 +471,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(); |
@@ -910,9 +898,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) { |