| 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 // This is the base interface for a preference services that provides | 5 // This is the base interface for a preference services that provides |
| 6 // a way to access the application's current preferences. | 6 // a way to access the application's current preferences. |
| 7 // | 7 // |
| 8 // This base interface assumes all preferences are local. See | 8 // This base interface assumes all preferences are local. See |
| 9 // SyncablePrefServiceBase for the interface to a preference service | 9 // SyncablePrefServiceBase for the interface to a preference service |
| 10 // that stores preferences that can be synced. | 10 // that stores preferences that can be synced. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 PrefSyncStatus sync_status) = 0; | 154 PrefSyncStatus sync_status) = 0; |
| 155 virtual void RegisterIntegerPref(const char* path, | 155 virtual void RegisterIntegerPref(const char* path, |
| 156 int default_value, | 156 int default_value, |
| 157 PrefSyncStatus sync_status) = 0; | 157 PrefSyncStatus sync_status) = 0; |
| 158 virtual void RegisterDoublePref(const char* path, | 158 virtual void RegisterDoublePref(const char* path, |
| 159 double default_value, | 159 double default_value, |
| 160 PrefSyncStatus sync_status) = 0; | 160 PrefSyncStatus sync_status) = 0; |
| 161 virtual void RegisterStringPref(const char* path, | 161 virtual void RegisterStringPref(const char* path, |
| 162 const std::string& default_value, | 162 const std::string& default_value, |
| 163 PrefSyncStatus sync_status) = 0; | 163 PrefSyncStatus sync_status) = 0; |
| 164 virtual void RegisterStringPrefIfNew(const char* path, |
| 165 const std::string& default_value, |
| 166 PrefSyncStatus sync_status) = 0; |
| 164 virtual void RegisterFilePathPref(const char* path, | 167 virtual void RegisterFilePathPref(const char* path, |
| 165 const FilePath& default_value, | 168 const FilePath& default_value, |
| 166 PrefSyncStatus sync_status) = 0; | 169 PrefSyncStatus sync_status) = 0; |
| 167 virtual void RegisterListPref(const char* path, | 170 virtual void RegisterListPref(const char* path, |
| 168 PrefSyncStatus sync_status) = 0; | 171 PrefSyncStatus sync_status) = 0; |
| 169 virtual void RegisterDictionaryPref(const char* path, | 172 virtual void RegisterDictionaryPref(const char* path, |
| 170 PrefSyncStatus sync_status) = 0; | 173 PrefSyncStatus sync_status) = 0; |
| 171 // These take ownership of the default_value: | 174 // These take ownership of the default_value: |
| 172 virtual void RegisterListPref(const char* path, | 175 virtual void RegisterListPref(const char* path, |
| 173 base::ListValue* default_value, | 176 base::ListValue* default_value, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 // method with PREF_CHANGED. Note that observers should not call these methods | 266 // method with PREF_CHANGED. Note that observers should not call these methods |
| 264 // directly but rather use a PrefChangeRegistrar to make sure the observer | 267 // directly but rather use a PrefChangeRegistrar to make sure the observer |
| 265 // gets cleaned up properly. | 268 // gets cleaned up properly. |
| 266 virtual void AddPrefObserver(const char* path, | 269 virtual void AddPrefObserver(const char* path, |
| 267 content::NotificationObserver* obs) = 0; | 270 content::NotificationObserver* obs) = 0; |
| 268 virtual void RemovePrefObserver(const char* path, | 271 virtual void RemovePrefObserver(const char* path, |
| 269 content::NotificationObserver* obs) = 0; | 272 content::NotificationObserver* obs) = 0; |
| 270 }; | 273 }; |
| 271 | 274 |
| 272 #endif // BASE_PREFS_PUBLIC_PREF_SERVICE_BASE_H_ | 275 #endif // BASE_PREFS_PUBLIC_PREF_SERVICE_BASE_H_ |
| OLD | NEW |