| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 void ScheduleSavePersistentPrefs(); | 144 void ScheduleSavePersistentPrefs(); |
| 145 | 145 |
| 146 // Make the PrefService aware of a pref. | 146 // Make the PrefService aware of a pref. |
| 147 void RegisterBooleanPref(const char* path, bool default_value); | 147 void RegisterBooleanPref(const char* path, bool default_value); |
| 148 void RegisterIntegerPref(const char* path, int default_value); | 148 void RegisterIntegerPref(const char* path, int default_value); |
| 149 void RegisterDoublePref(const char* path, double default_value); | 149 void RegisterDoublePref(const char* path, double default_value); |
| 150 void RegisterStringPref(const char* path, const std::string& default_value); | 150 void RegisterStringPref(const char* path, const std::string& default_value); |
| 151 void RegisterFilePathPref(const char* path, const FilePath& default_value); | 151 void RegisterFilePathPref(const char* path, const FilePath& default_value); |
| 152 void RegisterListPref(const char* path); | 152 void RegisterListPref(const char* path); |
| 153 void RegisterDictionaryPref(const char* path); | 153 void RegisterDictionaryPref(const char* path); |
| 154 // These take ownership of the default_value: |
| 155 void RegisterListPref(const char* path, ListValue* default_value); |
| 156 void RegisterDictionaryPref(const char* path, DictionaryValue* default_value); |
| 154 | 157 |
| 155 // These variants use a default value from the locale dll instead. | 158 // These variants use a default value from the locale dll instead. |
| 156 void RegisterLocalizedBooleanPref(const char* path, | 159 void RegisterLocalizedBooleanPref(const char* path, |
| 157 int locale_default_message_id); | 160 int locale_default_message_id); |
| 158 void RegisterLocalizedIntegerPref(const char* path, | 161 void RegisterLocalizedIntegerPref(const char* path, |
| 159 int locale_default_message_id); | 162 int locale_default_message_id); |
| 160 void RegisterLocalizedDoublePref(const char* path, | 163 void RegisterLocalizedDoublePref(const char* path, |
| 161 int locale_default_message_id); | 164 int locale_default_message_id); |
| 162 void RegisterLocalizedStringPref(const char* path, | 165 void RegisterLocalizedStringPref(const char* path, |
| 163 int locale_default_message_id); | 166 int locale_default_message_id); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 307 |
| 305 // Local cache of registered Preference objects. The default_store_ | 308 // Local cache of registered Preference objects. The default_store_ |
| 306 // is authoritative with respect to what the types and default values | 309 // is authoritative with respect to what the types and default values |
| 307 // of registered preferences are. | 310 // of registered preferences are. |
| 308 mutable PreferenceSet prefs_; | 311 mutable PreferenceSet prefs_; |
| 309 | 312 |
| 310 DISALLOW_COPY_AND_ASSIGN(PrefService); | 313 DISALLOW_COPY_AND_ASSIGN(PrefService); |
| 311 }; | 314 }; |
| 312 | 315 |
| 313 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 316 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
| OLD | NEW |