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 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 // Chromium settings and storage represent user-selected preferences and | 7 // Chromium settings and storage represent user-selected preferences and |
8 // information and MUST not be extracted, overwritten or modified except | 8 // information and MUST not be extracted, overwritten or modified except |
9 // through Chromium defined APIs. | 9 // through Chromium defined APIs. |
10 | 10 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // Returns true if a value has been set for the specified path. | 224 // Returns true if a value has been set for the specified path. |
225 // NOTE: this is NOT the same as FindPreference. In particular | 225 // NOTE: this is NOT the same as FindPreference. In particular |
226 // FindPreference returns whether RegisterXXX has been invoked, where as | 226 // FindPreference returns whether RegisterXXX has been invoked, where as |
227 // this checks if a value exists for the path. | 227 // this checks if a value exists for the path. |
228 bool HasPrefPath(const char* path) const; | 228 bool HasPrefPath(const char* path) const; |
229 | 229 |
230 // Returns a dictionary with effective preference values. The ownership | 230 // Returns a dictionary with effective preference values. The ownership |
231 // is passed to the caller. | 231 // is passed to the caller. |
232 base::DictionaryValue* GetPreferenceValues() const; | 232 base::DictionaryValue* GetPreferenceValues() const; |
233 | 233 |
| 234 // Returns a dictionary with effective preference values. Contrary to |
| 235 // GetPreferenceValues(), the paths of registered preferences are not split on |
| 236 // '.' characters. If a registered preference stores a dictionary, however, |
| 237 // the hierarchical structure inside the preference will be preserved. |
| 238 // For example, if "foo.bar" is a registered preference, the result could look |
| 239 // like this: |
| 240 // {"foo.bar": {"a": {"b": true}}}. |
| 241 // The ownership is passed to the caller. |
| 242 base::DictionaryValue* GetPreferenceValuesWithoutPathExpansion() const; |
| 243 |
234 bool ReadOnly() const; | 244 bool ReadOnly() const; |
235 | 245 |
236 PrefInitializationStatus GetInitializationStatus() const; | 246 PrefInitializationStatus GetInitializationStatus() const; |
237 | 247 |
238 // Tell our PrefValueStore to update itself to |command_line_store|. | 248 // Tell our PrefValueStore to update itself to |command_line_store|. |
239 // Takes ownership of the store. | 249 // Takes ownership of the store. |
240 virtual void UpdateCommandLinePrefStore(PrefStore* command_line_store); | 250 virtual void UpdateCommandLinePrefStore(PrefStore* command_line_store); |
241 | 251 |
242 // We run the callback once, when initialization completes. The bool | 252 // We run the callback once, when initialization completes. The bool |
243 // parameter will be set to true for successful initialization, | 253 // parameter will be set to true for successful initialization, |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 350 |
341 // Local cache of registered Preference objects. The pref_registry_ | 351 // Local cache of registered Preference objects. The pref_registry_ |
342 // is authoritative with respect to what the types and default values | 352 // is authoritative with respect to what the types and default values |
343 // of registered preferences are. | 353 // of registered preferences are. |
344 mutable PreferenceMap prefs_map_; | 354 mutable PreferenceMap prefs_map_; |
345 | 355 |
346 DISALLOW_COPY_AND_ASSIGN(PrefService); | 356 DISALLOW_COPY_AND_ASSIGN(PrefService); |
347 }; | 357 }; |
348 | 358 |
349 #endif // BASE_PREFS_PREF_SERVICE_H_ | 359 #endif // BASE_PREFS_PREF_SERVICE_H_ |
OLD | NEW |