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 // This provides a way to access the application's current preferences. | 5 // This provides a way to access the application's current preferences. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 7 #ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
8 #define CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 8 #define CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 PrefSyncStatus sync_status); | 231 PrefSyncStatus sync_status); |
232 void RegisterLocalizedDoublePref(const char* path, | 232 void RegisterLocalizedDoublePref(const char* path, |
233 int locale_default_message_id, | 233 int locale_default_message_id, |
234 PrefSyncStatus sync_status); | 234 PrefSyncStatus sync_status); |
235 void RegisterLocalizedStringPref(const char* path, | 235 void RegisterLocalizedStringPref(const char* path, |
236 int locale_default_message_id, | 236 int locale_default_message_id, |
237 PrefSyncStatus sync_status); | 237 PrefSyncStatus sync_status); |
238 void RegisterInt64Pref(const char* path, | 238 void RegisterInt64Pref(const char* path, |
239 int64 default_value, | 239 int64 default_value, |
240 PrefSyncStatus sync_status); | 240 PrefSyncStatus sync_status); |
| 241 // Unregisters a preference. |
| 242 void UnregisterPreference(const char* path); |
241 | 243 |
242 // If the path is valid and the value at the end of the path matches the type | 244 // If the path is valid and the value at the end of the path matches the type |
243 // specified, it will return the specified value. Otherwise, the default | 245 // specified, it will return the specified value. Otherwise, the default |
244 // value (set when the pref was registered) will be returned. | 246 // value (set when the pref was registered) will be returned. |
245 bool GetBoolean(const char* path) const; | 247 bool GetBoolean(const char* path) const; |
246 int GetInteger(const char* path) const; | 248 int GetInteger(const char* path) const; |
247 double GetDouble(const char* path) const; | 249 double GetDouble(const char* path) const; |
248 std::string GetString(const char* path) const; | 250 std::string GetString(const char* path) const; |
249 FilePath GetFilePath(const char* path) const; | 251 FilePath GetFilePath(const char* path) const; |
250 | 252 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 // of registered preferences are. | 387 // of registered preferences are. |
386 mutable PreferenceSet prefs_; | 388 mutable PreferenceSet prefs_; |
387 | 389 |
388 // The model associator that maintains the links with the sync db. | 390 // The model associator that maintains the links with the sync db. |
389 scoped_ptr<PrefModelAssociator> pref_sync_associator_; | 391 scoped_ptr<PrefModelAssociator> pref_sync_associator_; |
390 | 392 |
391 DISALLOW_COPY_AND_ASSIGN(PrefService); | 393 DISALLOW_COPY_AND_ASSIGN(PrefService); |
392 }; | 394 }; |
393 | 395 |
394 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 396 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
OLD | NEW |