Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5449)

Unified Diff: chrome/browser/web_resource/promo_resource_service.cc

Issue 12320064: Fix prefs registration in promo code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/web_resource/promo_resource_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_resource/promo_resource_service.cc
diff --git a/chrome/browser/web_resource/promo_resource_service.cc b/chrome/browser/web_resource/promo_resource_service.cc
index b6a3153564174c91af5e1bb67ba2f4f9cd66b40b..41ee47d75bbf7a7e19808b3623bb5ee52d68d3b0 100644
--- a/chrome/browser/web_resource/promo_resource_service.cc
+++ b/chrome/browser/web_resource/promo_resource_service.cc
@@ -68,16 +68,19 @@ void PromoResourceService::RegisterPrefs(PrefRegistrySimple* registry) {
}
// static
-void PromoResourceService::RegisterUserPrefs(PrefService* prefs,
- PrefRegistrySyncable* registry) {
- // TODO(dbeam): remove in M28 when all prefs have been cleared.
- // http://crbug.com/168887
- // TODO(joi): Remove PrefService parameter; move this to migration code.
+void PromoResourceService::RegisterUserPrefs(PrefRegistrySyncable* registry) {
+ // TODO(dbeam): This is registered only for migration; remove in M28
+ // when all prefs have been cleared. http://crbug.com/168887
registry->RegisterStringPref(prefs::kNtpPromoResourceCacheUpdate,
"0",
PrefRegistrySyncable::UNSYNCABLE_PREF);
- prefs->ClearPref(prefs::kNtpPromoResourceCacheUpdate);
- NotificationPromo::RegisterUserPrefs(prefs, registry);
+ NotificationPromo::RegisterUserPrefs(registry);
+}
+
+// static
+void PromoResourceService::MigrateUserPrefs(PrefService* user_prefs) {
+ user_prefs->ClearPref(prefs::kNtpPromoResourceCacheUpdate);
+ NotificationPromo::MigrateUserPrefs(user_prefs);
}
PromoResourceService::PromoResourceService()
« no previous file with comments | « chrome/browser/web_resource/promo_resource_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698