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

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

Issue 7838030: WIP: Introduce per-TabContents PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
Index: chrome/browser/prefs/pref_notifier_impl.h
diff --git a/chrome/browser/prefs/pref_notifier_impl.h b/chrome/browser/prefs/pref_notifier_impl.h
index 8323fcbec5bc3804384df50c59f8d0eb81c34d54..e776ddb9ed1fffdf1418eeadc6cf786d739cf2e2 100644
--- a/chrome/browser/prefs/pref_notifier_impl.h
+++ b/chrome/browser/prefs/pref_notifier_impl.h
@@ -13,14 +13,15 @@
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/prefs/pref_notifier.h"
-class PrefService;
class NotificationObserver;
+class PrefModelAssociator;
+class PrefService;
// The PrefNotifier implementation used by the PrefService.
class PrefNotifierImpl : public PrefNotifier,
public base::NonThreadSafe {
public:
- explicit PrefNotifierImpl(PrefService* pref_service);
+ PrefNotifierImpl();
virtual ~PrefNotifierImpl();
// If the pref at the given path changes, we call the observer's Observe
@@ -32,6 +33,12 @@ class PrefNotifierImpl : public PrefNotifier,
virtual void OnPreferenceChanged(const std::string& pref_name);
virtual void OnInitializationCompleted(bool succeeded);
+ // Sets the source PrefService.
+ void SetSource(PrefService* pref_service);
+
+ // Sets the associator.
+ void SetPrefModelAssociator(PrefModelAssociator* associator);
+
protected:
// A map from pref names to a list of observers. Observers get fired in the
// order they are added. These should only be accessed externally for unit
@@ -52,6 +59,9 @@ class PrefNotifierImpl : public PrefNotifier,
PrefObserverMap pref_observers_;
+ // The sync associator that needs to be notified on every pref change.
+ PrefModelAssociator* pref_model_associator_;
+
DISALLOW_COPY_AND_ASSIGN(PrefNotifierImpl);
};
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_notifier_impl.cc » ('j') | chrome/browser/prefs/tab_contents_user_pref_store.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698