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

Unified Diff: chrome/browser/prefs/pref_service.h

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit Created 8 years, 1 month 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/prefs/pref_observer_mock.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_service.h
diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h
index c855ef1f33664d65ee908f17b4e140c98852ff6e..1536b9530642b6bc0db09433f8474f451439b2f1 100644
--- a/chrome/browser/prefs/pref_service.h
+++ b/chrome/browser/prefs/pref_service.h
@@ -14,6 +14,7 @@
#include <set>
#include <string>
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/hash_tables.h"
@@ -27,6 +28,7 @@ class PersistentPrefStore;
class PrefModelAssociator;
class PrefNotifier;
class PrefNotifierImpl;
+class PrefObserver;
class PrefServiceObserver;
class PrefStore;
class PrefValueStore;
@@ -277,6 +279,11 @@ class PrefService : public PrefServiceBase, public base::NonThreadSafe {
// Do not call this after having derived an incognito or per tab pref service.
void UpdateCommandLinePrefStore(CommandLine* command_line);
+ // We run the callback once, when initialization completes. The bool
+ // parameter will be set to true for successful initialization,
+ // false for unsuccessful.
+ void AddPrefInitObserver(base::Callback<void(bool)> callback);
+
protected:
// Construct a new pref service. This constructor is what
// factory methods end up calling and what is used for unit tests.
@@ -306,9 +313,9 @@ class PrefService : public PrefServiceBase, public base::NonThreadSafe {
// PrefServiceBase implementation (protected in base, private here).
virtual void AddPrefObserver(const char* path,
- content::NotificationObserver* obs) OVERRIDE;
+ PrefObserver* obs) OVERRIDE;
virtual void RemovePrefObserver(const char* path,
- content::NotificationObserver* obs) OVERRIDE;
+ PrefObserver* obs) OVERRIDE;
// Sends notification of a changed preference. This needs to be called by
// a ScopedUserPrefUpdate if a DictionaryValue or ListValue is changed.
« no previous file with comments | « chrome/browser/prefs/pref_observer_mock.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698