Fix prefs registration in promo code.
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/12320064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184473 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index ee5bf22a..72b2f7c7 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -293,7 +293,7 @@
PrefProxyConfigTrackerImpl::RegisterUserPrefs(registry);
PrefsTabHelper::RegisterUserPrefs(registry);
ProfileImpl::RegisterUserPrefs(registry);
- PromoResourceService::RegisterUserPrefs(user_prefs, registry);
+ PromoResourceService::RegisterUserPrefs(registry);
ProtocolHandlerRegistry::RegisterUserPrefs(registry);
RegisterBrowserUserPrefs(registry);
SessionStartupPref::RegisterUserPrefs(registry);
@@ -369,6 +369,7 @@
prefs->ClearPref(kBackupPref);
PrefsTabHelper::MigrateUserPrefs(prefs);
+ PromoResourceService::MigrateUserPrefs(prefs);
}
void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) {