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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // browser.window_placement). | 73 // browser.window_placement). |
74 const std::string name() const; | 74 const std::string name() const; |
75 | 75 |
76 // Returns the registered type of the preference. | 76 // Returns the registered type of the preference. |
77 base::Value::Type GetType() const; | 77 base::Value::Type GetType() const; |
78 | 78 |
79 // Returns the value of the Preference, falling back to the registered | 79 // Returns the value of the Preference, falling back to the registered |
80 // default value if no other has been set. | 80 // default value if no other has been set. |
81 const base::Value* GetValue() const; | 81 const base::Value* GetValue() const; |
82 | 82 |
| 83 // Returns the value set by the user, if any. |
| 84 const base::Value* GetUserValue() const; |
| 85 |
83 // Returns the value recommended by the admin, if any. | 86 // Returns the value recommended by the admin, if any. |
84 const base::Value* GetRecommendedValue() const; | 87 const base::Value* GetRecommendedValue() const; |
85 | 88 |
86 // Returns true if the Preference is managed, i.e. set by an admin policy. | 89 // Returns true if the Preference is managed, i.e. set by an admin policy. |
87 // Since managed prefs have the highest priority, this also indicates | 90 // Since managed prefs have the highest priority, this also indicates |
88 // whether the pref is actually being controlled by the policy setting. | 91 // whether the pref is actually being controlled by the policy setting. |
89 bool IsManaged() const; | 92 bool IsManaged() const; |
90 | 93 |
91 // Returns true if the Preference is recommended, i.e. set by an admin | 94 // Returns true if the Preference is recommended, i.e. set by an admin |
92 // policy but the user is allowed to change it. | 95 // policy but the user is allowed to change it. |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 353 |
351 // Local cache of registered Preference objects. The pref_registry_ | 354 // Local cache of registered Preference objects. The pref_registry_ |
352 // is authoritative with respect to what the types and default values | 355 // is authoritative with respect to what the types and default values |
353 // of registered preferences are. | 356 // of registered preferences are. |
354 mutable PreferenceMap prefs_map_; | 357 mutable PreferenceMap prefs_map_; |
355 | 358 |
356 DISALLOW_COPY_AND_ASSIGN(PrefService); | 359 DISALLOW_COPY_AND_ASSIGN(PrefService); |
357 }; | 360 }; |
358 | 361 |
359 #endif // BASE_PREFS_PREF_SERVICE_H_ | 362 #endif // BASE_PREFS_PREF_SERVICE_H_ |
OLD | NEW |