Chromium Code Reviews| Index: chrome/common/pref_store.h |
| diff --git a/chrome/common/pref_store.h b/chrome/common/pref_store.h |
| index 35818a0aa039ac617453c393bcfdf44b62f183c5..d45432ad40df8449c0e6a84ea42278853b6ef0e5 100644 |
| --- a/chrome/common/pref_store.h |
| +++ b/chrome/common/pref_store.h |
| @@ -9,6 +9,7 @@ |
| #include <string> |
| #include "base/basictypes.h" |
| +#include "base/ref_counted.h" |
| class Value; |
| @@ -19,7 +20,7 @@ class Value; |
| // CommandLinePrefStore, which bridges command line options to preferences and |
| // ConfigurationPolicyPrefStore, which is used for hooking up configuration |
| // policy with the preference subsystem. |
| -class PrefStore { |
| +class PrefStore : public base::RefCounted<PrefStore> { |
| public: |
| // Observer interface for monitoring PrefStore. |
| class Observer { |
| @@ -43,7 +44,6 @@ class PrefStore { |
| }; |
| PrefStore() {} |
| - virtual ~PrefStore() {} |
| // Add and remove observers. |
| virtual void AddObserver(Observer* observer) {} |
| @@ -57,6 +57,12 @@ class PrefStore { |
| // |result| value remains with the PrefStore. |
| virtual ReadResult GetValue(const std::string& key, Value** result) const = 0; |
| + protected: |
| + friend class base::RefCounted<PrefStore>; |
|
Mattias Nissler (ping if slow)
2010/12/22 12:09:03
Why not move these to the private section?
battre
2010/12/22 18:34:53
PrefStore is a base class. Derived classes need to
|
| + |
| + virtual ~PrefStore() {} |
| + |
| + private: |
| DISALLOW_COPY_AND_ASSIGN(PrefStore); |
| }; |