Chromium Code Reviews| Index: chrome/browser/prefs/browser_prefs.cc |
| diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc |
| index 635f01e771e62bfff8847d5cf1de23a42e8865ab..4f17571609b014461b2a319cf1d97476301c5732 100644 |
| --- a/chrome/browser/prefs/browser_prefs.cc |
| +++ b/chrome/browser/prefs/browser_prefs.cc |
| @@ -557,70 +557,31 @@ void RegisterLoginProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| void MigrateUserPrefs(Profile* profile) { |
| PrefService* prefs = profile->GetPrefs(); |
| - // Cleanup prefs from now-removed protector feature. |
| - prefs->ClearPref(kBackupPref); |
|
gab
2015/02/20 20:33:57
Remove kBackupPref's definition higher up in this
rkaplow
2015/02/20 21:58:08
Am I good to remove this initialization of the pre
gab
2015/02/23 16:09:37
Yes, prefs that are still cleared will need to be
rkaplow
2015/02/23 23:27:52
Done.
|
| - |
| -#if !defined(OS_ANDROID) |
| + // Added 08/2014. |
| // Migrate kNetworkPredictionEnabled to kNetworkPredictionOptions when not on |
| // Android. On Android, platform-specific code performs preference migration. |
| // TODO(bnc): https://crbug.com/401970 Remove migration code one year after |
| // M38. |
| +#if !defined(OS_ANDROID) |
|
gab
2015/02/20 20:33:57
I liked having the comment inside the ifdef, pleas
rkaplow
2015/02/20 21:58:08
Done.
I rearranged everything to be ordered by da
|
| chrome_browser_net::MigrateNetworkPredictionUserPrefs(prefs); |
| #endif |
| - PromoResourceService::MigrateUserPrefs(prefs); |
| + // Added 07/2014. |
| translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
| + // Added 06/2014. |
| #if defined(OS_MACOSX) && !defined(OS_IOS) |
| autofill::AutofillManager::MigrateUserPrefs(prefs); |
| #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| } |
| void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { |
| - // Copy pref values which have been migrated to user_prefs from local_state, |
| - // or remove them from local_state outright, if copying is not required. |
| - int current_version = |
| - local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
|
gab
2015/02/20 20:33:57
Also remove all constants cleaned up below from th
rkaplow
2015/02/23 23:27:52
should be done.
|
| - PrefRegistrySimple* registry = static_cast<PrefRegistrySimple*>( |
| - local_state->DeprecatedGetPrefRegistry()); |
| - |
| - if (!(current_version & DNS_PREFS)) { |
| - registry->RegisterListPref(prefs::kDnsStartupPrefetchList); |
| - local_state->ClearPref(prefs::kDnsStartupPrefetchList); |
| - |
| - registry->RegisterListPref(prefs::kDnsHostReferralList); |
| - local_state->ClearPref(prefs::kDnsHostReferralList); |
| - |
| - current_version |= DNS_PREFS; |
| - local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| - current_version); |
| - } |
| - |
| - PrefService* user_prefs = profile->GetPrefs(); |
| - if (!(current_version & WINDOWS_PREFS)) { |
| - registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); |
| - if (local_state->HasPrefPath(prefs::kBrowserWindowPlacement)) { |
| - const PrefService::Preference* pref = |
| - local_state->FindPreference(prefs::kBrowserWindowPlacement); |
| - DCHECK(pref); |
| - user_prefs->Set(prefs::kBrowserWindowPlacement, |
| - *(pref->GetValue())); |
| - } |
| - local_state->ClearPref(prefs::kBrowserWindowPlacement); |
| - |
| - current_version |= WINDOWS_PREFS; |
| - local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| - current_version); |
| - } |
| - |
| + // Added 08/2014. |
| #if !defined(OS_ANDROID) |
| local_state->ClearPref(kLegacyProfileResetPromptMemento); |
|
gab
2015/02/20 20:33:57
For prefs that are cleared inline (like this one),
rkaplow
2015/02/20 21:58:08
This gets used elsewhere, https://code.google.com/
gab
2015/02/23 16:09:37
Oops as mentioned above we'll need keep the file s
rkaplow
2015/02/23 22:55:03
There's actually a comment for kLegacyProfileReset
|
| #endif |
| -#if defined(OS_CHROMEOS) |
| - chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); |
| -#endif |
| - |
| + // Added 05/2014. |
| #if defined(TOOLKIT_VIEWS) |
| MigrateBrowserTabStripPrefs(local_state); |
| #endif |