OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PERSISTENT_PREF_STORE_H_ | 5 #ifndef CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_ |
6 #define CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_ | 6 #define CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 virtual ReadResult GetValue(const std::string& key, | 36 virtual ReadResult GetValue(const std::string& key, |
37 const Value** result) const; | 37 const Value** result) const; |
38 | 38 |
39 // Methods of PersistentPrefStore. | 39 // Methods of PersistentPrefStore. |
40 virtual ReadResult GetMutableValue(const std::string& key, Value** result); | 40 virtual ReadResult GetMutableValue(const std::string& key, Value** result); |
41 virtual void SetValue(const std::string& key, Value* value); | 41 virtual void SetValue(const std::string& key, Value* value); |
42 virtual void SetValueSilently(const std::string& key, Value* value); | 42 virtual void SetValueSilently(const std::string& key, Value* value); |
43 virtual void RemoveValue(const std::string& key); | 43 virtual void RemoveValue(const std::string& key); |
44 virtual bool ReadOnly() const; | 44 virtual bool ReadOnly() const; |
45 virtual PrefReadError ReadPrefs(); | 45 virtual PrefReadError ReadPrefs(); |
| 46 virtual void ReadPrefsAsync(); |
| 47 virtual void GetErrors(PrefReadError* error, bool* is_fatal); |
46 virtual bool WritePrefs(); | 48 virtual bool WritePrefs(); |
47 virtual void ScheduleWritePrefs(); | 49 virtual void ScheduleWritePrefs(); |
48 virtual void CommitPendingWrite(); | 50 virtual void CommitPendingWrite(); |
49 virtual void ReportValueChanged(const std::string& key); | 51 virtual void ReportValueChanged(const std::string& key); |
50 | 52 |
51 private: | 53 private: |
52 // Methods of PrefStore::Observer. | 54 // Methods of PrefStore::Observer. |
53 virtual void OnPrefValueChanged(const std::string& key); | 55 virtual void OnPrefValueChanged(const std::string& key); |
54 virtual void OnInitializationCompleted(); | 56 virtual void OnInitializationCompleted(); |
55 | 57 |
56 ObserverList<PrefStore::Observer, true> observers_; | 58 ObserverList<PrefStore::Observer, true> observers_; |
57 PrefValueMap overlay_; | 59 PrefValueMap overlay_; |
58 scoped_refptr<PersistentPrefStore> underlay_; | 60 scoped_refptr<PersistentPrefStore> underlay_; |
59 | 61 |
60 DISALLOW_COPY_AND_ASSIGN(OverlayPersistentPrefStore); | 62 DISALLOW_COPY_AND_ASSIGN(OverlayPersistentPrefStore); |
61 }; | 63 }; |
62 | 64 |
63 #endif // CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_ | 65 #endif // CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_ |
OLD | NEW |