| 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 CHROME_BROWSER_PREFS_OVERLAY_USER_PREF_STORE_H_ | 5 #ifndef CHROME_BROWSER_PREFS_OVERLAY_USER_PREF_STORE_H_ |
| 6 #define CHROME_BROWSER_PREFS_OVERLAY_USER_PREF_STORE_H_ | 6 #define CHROME_BROWSER_PREFS_OVERLAY_USER_PREF_STORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 virtual ~OverlayUserPrefStore(); | 26 virtual ~OverlayUserPrefStore(); |
| 27 | 27 |
| 28 // Returns true if a value has been set for the |key| in this | 28 // Returns true if a value has been set for the |key| in this |
| 29 // OverlayUserPrefStore, i.e. if it potentially overrides a value | 29 // OverlayUserPrefStore, i.e. if it potentially overrides a value |
| 30 // from the |underlay_|. | 30 // from the |underlay_|. |
| 31 virtual bool IsSetInOverlay(const std::string& key) const; | 31 virtual bool IsSetInOverlay(const std::string& key) const; |
| 32 | 32 |
| 33 // Methods of PrefStore. | 33 // Methods of PrefStore. |
| 34 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE; | 34 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE; |
| 35 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE; | 35 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE; |
| 36 virtual size_t NumberOfObservers() const OVERRIDE; |
| 36 virtual bool IsInitializationComplete() const OVERRIDE; | 37 virtual bool IsInitializationComplete() const OVERRIDE; |
| 37 virtual ReadResult GetValue(const std::string& key, | 38 virtual ReadResult GetValue(const std::string& key, |
| 38 const base::Value** result) const OVERRIDE; | 39 const base::Value** result) const OVERRIDE; |
| 39 | 40 |
| 40 // Methods of PersistentPrefStore. | 41 // Methods of PersistentPrefStore. |
| 41 virtual ReadResult GetMutableValue(const std::string& key, | 42 virtual ReadResult GetMutableValue(const std::string& key, |
| 42 base::Value** result) OVERRIDE; | 43 base::Value** result) OVERRIDE; |
| 43 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE; | 44 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE; |
| 44 virtual void SetValueSilently(const std::string& key, | 45 virtual void SetValueSilently(const std::string& key, |
| 45 base::Value* value) OVERRIDE; | 46 base::Value* value) OVERRIDE; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 71 ObserverList<PrefStore::Observer, true> observers_; | 72 ObserverList<PrefStore::Observer, true> observers_; |
| 72 PrefValueMap overlay_; | 73 PrefValueMap overlay_; |
| 73 scoped_refptr<PersistentPrefStore> underlay_; | 74 scoped_refptr<PersistentPrefStore> underlay_; |
| 74 NamesMap overlay_to_underlay_names_map_; | 75 NamesMap overlay_to_underlay_names_map_; |
| 75 NamesMap underlay_to_overlay_names_map_; | 76 NamesMap underlay_to_overlay_names_map_; |
| 76 | 77 |
| 77 DISALLOW_COPY_AND_ASSIGN(OverlayUserPrefStore); | 78 DISALLOW_COPY_AND_ASSIGN(OverlayUserPrefStore); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 #endif // CHROME_BROWSER_PREFS_OVERLAY_USER_PREF_STORE_H_ | 81 #endif // CHROME_BROWSER_PREFS_OVERLAY_USER_PREF_STORE_H_ |
| OLD | NEW |