| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COMMON_PREF_STORE_H_ | 5 #ifndef CHROME_COMMON_PREF_STORE_H_ |
| 6 #define CHROME_COMMON_PREF_STORE_H_ | 6 #define CHROME_COMMON_PREF_STORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 class DictionaryValue; | 9 class DictionaryValue; |
| 10 class Value; | 10 class Value; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Whether the store is in a pseudo-read-only mode where changes are not | 49 // Whether the store is in a pseudo-read-only mode where changes are not |
| 50 // actually persisted to disk. This happens in some cases when there are | 50 // actually persisted to disk. This happens in some cases when there are |
| 51 // read errors during startup. | 51 // read errors during startup. |
| 52 virtual bool ReadOnly() { return true; } | 52 virtual bool ReadOnly() { return true; } |
| 53 | 53 |
| 54 // TODO(danno): PrefValueStore shouldn't allow direct access to the | 54 // TODO(danno): PrefValueStore shouldn't allow direct access to the |
| 55 // DictionaryValue. Instead, it should have getters that return a | 55 // DictionaryValue. Instead, it should have getters that return a |
| 56 // richer set of information for a pref, including if the store | 56 // richer set of information for a pref, including if the store |
| 57 // wants to return the default value for a preference. | 57 // wants to return the default value for a preference. |
| 58 virtual DictionaryValue* prefs() = 0; | 58 virtual DictionaryValue* prefs() const = 0; |
| 59 | 59 |
| 60 virtual PrefReadError ReadPrefs() = 0; | 60 virtual PrefReadError ReadPrefs() = 0; |
| 61 | 61 |
| 62 virtual bool WritePrefs() { return true; } | 62 virtual bool WritePrefs() { return true; } |
| 63 | 63 |
| 64 virtual void ScheduleWritePrefs() { } | 64 virtual void ScheduleWritePrefs() { } |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 #endif // CHROME_COMMON_PREF_STORE_H_ | 67 #endif // CHROME_COMMON_PREF_STORE_H_ |
| OLD | NEW |