| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_PREFS_OVERLAY_USER_PREF_STORE_H_ | 5 #ifndef BASE_PREFS_OVERLAY_USER_PREF_STORE_H_ |
| 6 #define BASE_PREFS_OVERLAY_USER_PREF_STORE_H_ | 6 #define BASE_PREFS_OVERLAY_USER_PREF_STORE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Returns true if a value has been set for the |key| in this | 27 // Returns true if a value has been set for the |key| in this |
| 28 // OverlayUserPrefStore, i.e. if it potentially overrides a value | 28 // OverlayUserPrefStore, i.e. if it potentially overrides a value |
| 29 // from the |underlay_|. | 29 // from the |underlay_|. |
| 30 virtual bool IsSetInOverlay(const std::string& key) const; | 30 virtual bool IsSetInOverlay(const std::string& key) const; |
| 31 | 31 |
| 32 // Methods of PrefStore. | 32 // Methods of PrefStore. |
| 33 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE; | 33 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE; |
| 34 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE; | 34 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE; |
| 35 virtual size_t NumberOfObservers() const OVERRIDE; | 35 virtual size_t NumberOfObservers() const OVERRIDE; |
| 36 virtual bool IsInitializationComplete() const OVERRIDE; | 36 virtual bool IsInitializationComplete() const OVERRIDE; |
| 37 virtual ReadResult GetValue(const std::string& key, | 37 virtual bool GetValue(const std::string& key, |
| 38 const base::Value** result) const OVERRIDE; | 38 const base::Value** result) const OVERRIDE; |
| 39 | 39 |
| 40 // Methods of PersistentPrefStore. | 40 // Methods of PersistentPrefStore. |
| 41 virtual ReadResult GetMutableValue(const std::string& key, | 41 virtual bool GetMutableValue(const std::string& key, |
| 42 base::Value** result) OVERRIDE; | 42 base::Value** result) OVERRIDE; |
| 43 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE; | 43 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE; |
| 44 virtual void SetValueSilently(const std::string& key, | 44 virtual void SetValueSilently(const std::string& key, |
| 45 base::Value* value) OVERRIDE; | 45 base::Value* value) OVERRIDE; |
| 46 virtual void RemoveValue(const std::string& key) OVERRIDE; | 46 virtual void RemoveValue(const std::string& key) OVERRIDE; |
| 47 virtual void MarkNeedsEmptyValue(const std::string& key) OVERRIDE; | 47 virtual void MarkNeedsEmptyValue(const std::string& key) OVERRIDE; |
| 48 virtual bool ReadOnly() const OVERRIDE; | 48 virtual bool ReadOnly() const OVERRIDE; |
| 49 virtual PrefReadError GetReadError() const OVERRIDE; | 49 virtual PrefReadError GetReadError() const OVERRIDE; |
| 50 virtual PrefReadError ReadPrefs() OVERRIDE; | 50 virtual PrefReadError ReadPrefs() OVERRIDE; |
| 51 virtual void ReadPrefsAsync(ReadErrorDelegate* delegate) OVERRIDE; | 51 virtual void ReadPrefsAsync(ReadErrorDelegate* delegate) OVERRIDE; |
| 52 virtual void CommitPendingWrite() OVERRIDE; | 52 virtual void CommitPendingWrite() OVERRIDE; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 76 ObserverList<PrefStore::Observer, true> observers_; | 76 ObserverList<PrefStore::Observer, true> observers_; |
| 77 PrefValueMap overlay_; | 77 PrefValueMap overlay_; |
| 78 scoped_refptr<PersistentPrefStore> underlay_; | 78 scoped_refptr<PersistentPrefStore> underlay_; |
| 79 NamesMap overlay_to_underlay_names_map_; | 79 NamesMap overlay_to_underlay_names_map_; |
| 80 NamesMap underlay_to_overlay_names_map_; | 80 NamesMap underlay_to_overlay_names_map_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(OverlayUserPrefStore); | 82 DISALLOW_COPY_AND_ASSIGN(OverlayUserPrefStore); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 #endif // BASE_PREFS_OVERLAY_USER_PREF_STORE_H_ | 85 #endif // BASE_PREFS_OVERLAY_USER_PREF_STORE_H_ |
| OLD | NEW |