| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void ScheduleSavePersistentPrefs(); | 140 void ScheduleSavePersistentPrefs(); |
| 141 | 141 |
| 142 // Make the PrefService aware of a pref. | 142 // Make the PrefService aware of a pref. |
| 143 void RegisterBooleanPref(const char* path, bool default_value); | 143 void RegisterBooleanPref(const char* path, bool default_value); |
| 144 void RegisterIntegerPref(const char* path, int default_value); | 144 void RegisterIntegerPref(const char* path, int default_value); |
| 145 void RegisterRealPref(const char* path, double default_value); | 145 void RegisterRealPref(const char* path, double default_value); |
| 146 void RegisterStringPref(const char* path, const std::string& default_value); | 146 void RegisterStringPref(const char* path, const std::string& default_value); |
| 147 void RegisterFilePathPref(const char* path, const FilePath& default_value); | 147 void RegisterFilePathPref(const char* path, const FilePath& default_value); |
| 148 void RegisterListPref(const char* path); | 148 void RegisterListPref(const char* path); |
| 149 void RegisterDictionaryPref(const char* path); | 149 void RegisterDictionaryPref(const char* path); |
| 150 // These take ownership of the default_value: |
| 151 void RegisterListPref(const char* path, ListValue* default_value); |
| 152 void RegisterDictionaryPref(const char* path, DictionaryValue* default_value); |
| 150 | 153 |
| 151 // These variants use a default value from the locale dll instead. | 154 // These variants use a default value from the locale dll instead. |
| 152 void RegisterLocalizedBooleanPref(const char* path, | 155 void RegisterLocalizedBooleanPref(const char* path, |
| 153 int locale_default_message_id); | 156 int locale_default_message_id); |
| 154 void RegisterLocalizedIntegerPref(const char* path, | 157 void RegisterLocalizedIntegerPref(const char* path, |
| 155 int locale_default_message_id); | 158 int locale_default_message_id); |
| 156 void RegisterLocalizedRealPref(const char* path, | 159 void RegisterLocalizedRealPref(const char* path, |
| 157 int locale_default_message_id); | 160 int locale_default_message_id); |
| 158 void RegisterLocalizedStringPref(const char* path, | 161 void RegisterLocalizedStringPref(const char* path, |
| 159 int locale_default_message_id); | 162 int locale_default_message_id); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 296 |
| 294 // Local cache of registered Preference objects. The default_store_ | 297 // Local cache of registered Preference objects. The default_store_ |
| 295 // is authoritative with respect to what the types and default values | 298 // is authoritative with respect to what the types and default values |
| 296 // of registered preferences are. | 299 // of registered preferences are. |
| 297 mutable PreferenceSet prefs_; | 300 mutable PreferenceSet prefs_; |
| 298 | 301 |
| 299 DISALLOW_COPY_AND_ASSIGN(PrefService); | 302 DISALLOW_COPY_AND_ASSIGN(PrefService); |
| 300 }; | 303 }; |
| 301 | 304 |
| 302 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 305 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
| OLD | NEW |