| 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_COMMON_PERSISTENT_PREF_STORE_H_ | 5 #ifndef CHROME_COMMON_PERSISTENT_PREF_STORE_H_ |
| 6 #define CHROME_COMMON_PERSISTENT_PREF_STORE_H_ | 6 #define CHROME_COMMON_PERSISTENT_PREF_STORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // Reads the preferences from disk. Notifies observers via | 73 // Reads the preferences from disk. Notifies observers via |
| 74 // "PrefStore::OnInitializationCompleted" when done. | 74 // "PrefStore::OnInitializationCompleted" when done. |
| 75 virtual PrefReadError ReadPrefs() = 0; | 75 virtual PrefReadError ReadPrefs() = 0; |
| 76 | 76 |
| 77 // Reads the preferences from disk asynchronously. Notifies observers via | 77 // Reads the preferences from disk asynchronously. Notifies observers via |
| 78 // "PrefStore::OnInitializationCompleted" when done. Also it fires | 78 // "PrefStore::OnInitializationCompleted" when done. Also it fires |
| 79 // |error_delegate| if it is not NULL and reading error has occurred. | 79 // |error_delegate| if it is not NULL and reading error has occurred. |
| 80 // Owns |error_delegate|. | 80 // Owns |error_delegate|. |
| 81 virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) = 0; | 81 virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) = 0; |
| 82 | 82 |
| 83 // Writes the preferences to disk immediately. | |
| 84 virtual bool WritePrefs() = 0; | |
| 85 | |
| 86 // Schedules an asynchronous write operation. | |
| 87 virtual void ScheduleWritePrefs() = 0; | |
| 88 | |
| 89 // Lands any pending writes to disk. | 83 // Lands any pending writes to disk. |
| 90 virtual void CommitPendingWrite() = 0; | 84 virtual void CommitPendingWrite() = 0; |
| 91 }; | 85 }; |
| 92 | 86 |
| 93 #endif // CHROME_COMMON_PERSISTENT_PREF_STORE_H_ | 87 #endif // CHROME_COMMON_PERSISTENT_PREF_STORE_H_ |
| OLD | NEW |