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

Unified Diff: chrome/browser/notifications/notification_prefs_manager.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. 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/notifications/notification_prefs_manager.h ('k') | chrome/browser/plugins/plugin_finder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notification_prefs_manager.cc
diff --git a/chrome/browser/notifications/notification_prefs_manager.cc b/chrome/browser/notifications/notification_prefs_manager.cc
index 01928aac1617c7f82e8b05697aae94fc076216c7..1283d141b36ea348f0744af836ba98b102d5c158 100644
--- a/chrome/browser/notifications/notification_prefs_manager.cc
+++ b/chrome/browser/notifications/notification_prefs_manager.cc
@@ -4,16 +4,22 @@
#include "chrome/browser/notifications/notification_prefs_manager.h"
+#include "chrome/browser/prefs/pref_registry_simple.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/pref_names.h"
// static
-void NotificationPrefsManager::RegisterPrefs(PrefServiceSimple* prefs) {
- prefs->RegisterIntegerPref(prefs::kDesktopNotificationPosition,
- BalloonCollection::DEFAULT_POSITION);
+void NotificationPrefsManager::RegisterPrefs(PrefService* prefs,
+ PrefRegistrySimple* registry) {
+ registry->RegisterIntegerPref(prefs::kDesktopNotificationPosition,
+ BalloonCollection::DEFAULT_POSITION);
#if defined(OS_CHROMEOS)
// Option menu for changing desktop notification position on ChromeOS is
// disabled. Force preference to default.
+ //
+ // TODO(joi): This shouldn't be done during registration;
+ // registration should all be done up front, before there even
+ // exists a PrefService.
prefs->SetInteger(prefs::kDesktopNotificationPosition,
BalloonCollection::DEFAULT_POSITION);
#endif
« no previous file with comments | « chrome/browser/notifications/notification_prefs_manager.h ('k') | chrome/browser/plugins/plugin_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698