Index: base/prefs/pref_service.h |
diff --git a/base/prefs/pref_service.h b/base/prefs/pref_service.h |
index 186433c1b62907c16eb3360ca8d567ca2b1a07a6..0ba605e60de97955e86487b5cc4478c2bc194b18 100644 |
--- a/base/prefs/pref_service.h |
+++ b/base/prefs/pref_service.h |
@@ -17,6 +17,7 @@ |
#include "base/callback.h" |
#include "base/compiler_specific.h" |
#include "base/containers/hash_tables.h" |
+#include "base/containers/scoped_ptr_hash_map.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/observer_list.h" |
@@ -41,6 +42,10 @@ class PrefMemberBase; |
class ScopedUserPrefUpdateBase; |
} |
+// Base class for caches associated with the PrefService. |
+class BASE_PREFS_EXPORT PrefServiceCache { |
+}; |
+ |
// Base class for PrefServices. You can use the base class to read and |
// interact with preferences, but not to register new preferences; for |
// that see e.g. PrefRegistrySimple. |
@@ -270,6 +275,10 @@ class BASE_PREFS_EXPORT PrefService : public base::NonThreadSafe { |
// implemented in chrome/browser/prefs/browser_prefs.cc. |
PrefRegistry* DeprecatedGetPrefRegistry(); |
+ base::ScopedPtrHashMap<const char*, PrefServiceCache>* GetPrefsCaches() { |
+ return &prefs_caches_; |
+ } |
+ |
protected: |
// The PrefNotifier handles registering and notifying preference observers. |
// It is created and owned by this PrefService. Subclasses may access it for |
@@ -353,6 +362,9 @@ class BASE_PREFS_EXPORT PrefService : public base::NonThreadSafe { |
// of registered preferences are. |
mutable PreferenceMap prefs_map_; |
+ // General purpose caches. |
+ base::ScopedPtrHashMap<const char*, PrefServiceCache> prefs_caches_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PrefService); |
}; |