| Index: chrome/browser/ui/prefs/prefs_tab_helper.cc
|
| diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc
|
| index b9da3e826b5d22a5bfadb1ddf59b478f7c00f7bb..c6c9ccbfd223062aebece0ccea624b795fff9246 100644
|
| --- a/chrome/browser/ui/prefs/prefs_tab_helper.cc
|
| +++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc
|
| @@ -576,20 +576,18 @@ void PrefsTabHelper::RegisterUserPrefs(PrefRegistrySyncable* registry) {
|
| registry->RegisterStringPref(prefs::kRecentlySelectedEncoding,
|
| "",
|
| PrefRegistrySyncable::UNSYNCABLE_PREF);
|
| -}
|
|
|
| -void PrefsTabHelper::MigrateUserPrefs(PrefService* prefs,
|
| - PrefRegistrySyncable* registry) {
|
| RegisterPrefsToMigrate(registry);
|
| +}
|
| +
|
| +void PrefsTabHelper::MigrateUserPrefs(PrefService* prefs) {
|
| for (int i = 0; i < kPrefsToMigrateLength; ++i) {
|
| const PrefService::Preference* pref =
|
| prefs->FindPreference(kPrefNamesToMigrate[i].from);
|
| - if (!pref) continue;
|
| - if (!pref->IsDefaultValue()) {
|
| + if (pref && !pref->IsDefaultValue()) {
|
| prefs->Set(kPrefNamesToMigrate[i].to, *pref->GetValue());
|
| + prefs->ClearPref(kPrefNamesToMigrate[i].from);
|
| }
|
| - prefs->ClearPref(kPrefNamesToMigrate[i].from);
|
| - registry->DeprecatedUnregisterPreference(kPrefNamesToMigrate[i].from);
|
| }
|
| }
|
|
|
|
|