Fix prefs registration/migration for TranslatePrefs.
All preferences should be registered _before_ a PrefService is created,
so reading other prefs during registration is a no-no.
BUG=155525
Review URL: https://chromiumcodereview.appspot.com/12319069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184565 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 72b2f7c7..e671e318 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -298,7 +298,7 @@
RegisterBrowserUserPrefs(registry);
SessionStartupPref::RegisterUserPrefs(registry);
TemplateURLPrepopulateData::RegisterUserPrefs(registry);
- TranslatePrefs::RegisterUserPrefs(user_prefs, registry);
+ TranslatePrefs::RegisterUserPrefs(registry);
#if defined(ENABLE_CONFIGURATION_POLICY)
policy::URLBlacklistManager::RegisterUserPrefs(registry);
@@ -370,6 +370,7 @@
PrefsTabHelper::MigrateUserPrefs(prefs);
PromoResourceService::MigrateUserPrefs(prefs);
+ TranslatePrefs::MigrateUserPrefs(prefs);
}
void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) {