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 COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_ | 5 #ifndef COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_ |
6 #define COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_ | 6 #define COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 20 matching lines...) Expand all Loading... |
31 // from the |underlay_|. | 31 // from the |underlay_|. |
32 virtual bool IsSetInOverlay(const std::string& key) const; | 32 virtual bool IsSetInOverlay(const std::string& key) const; |
33 | 33 |
34 // Methods of PrefStore. | 34 // Methods of PrefStore. |
35 void AddObserver(PrefStore::Observer* observer) override; | 35 void AddObserver(PrefStore::Observer* observer) override; |
36 void RemoveObserver(PrefStore::Observer* observer) override; | 36 void RemoveObserver(PrefStore::Observer* observer) override; |
37 bool HasObservers() const override; | 37 bool HasObservers() const override; |
38 bool IsInitializationComplete() const override; | 38 bool IsInitializationComplete() const override; |
39 bool GetValue(const std::string& key, | 39 bool GetValue(const std::string& key, |
40 const base::Value** result) const override; | 40 const base::Value** result) const override; |
| 41 std::unique_ptr<base::DictionaryValue> GetValues() const override; |
41 | 42 |
42 // Methods of PersistentPrefStore. | 43 // Methods of PersistentPrefStore. |
43 bool GetMutableValue(const std::string& key, base::Value** result) override; | 44 bool GetMutableValue(const std::string& key, base::Value** result) override; |
44 void SetValue(const std::string& key, | 45 void SetValue(const std::string& key, |
45 std::unique_ptr<base::Value> value, | 46 std::unique_ptr<base::Value> value, |
46 uint32_t flags) override; | 47 uint32_t flags) override; |
47 void SetValueSilently(const std::string& key, | 48 void SetValueSilently(const std::string& key, |
48 std::unique_ptr<base::Value> value, | 49 std::unique_ptr<base::Value> value, |
49 uint32_t flags) override; | 50 uint32_t flags) override; |
50 void RemoveValue(const std::string& key, uint32_t flags) override; | 51 void RemoveValue(const std::string& key, uint32_t flags) override; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 base::ObserverList<PrefStore::Observer, true> observers_; | 83 base::ObserverList<PrefStore::Observer, true> observers_; |
83 PrefValueMap overlay_; | 84 PrefValueMap overlay_; |
84 scoped_refptr<PersistentPrefStore> underlay_; | 85 scoped_refptr<PersistentPrefStore> underlay_; |
85 NamesMap overlay_to_underlay_names_map_; | 86 NamesMap overlay_to_underlay_names_map_; |
86 NamesMap underlay_to_overlay_names_map_; | 87 NamesMap underlay_to_overlay_names_map_; |
87 | 88 |
88 DISALLOW_COPY_AND_ASSIGN(OverlayUserPrefStore); | 89 DISALLOW_COPY_AND_ASSIGN(OverlayUserPrefStore); |
89 }; | 90 }; |
90 | 91 |
91 #endif // COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_ | 92 #endif // COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_ |
OLD | NEW |