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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 // Returns the value of the Preference, falling back to the registered | 72 // Returns the value of the Preference, falling back to the registered |
73 // default value if no other has been set. | 73 // default value if no other has been set. |
74 const base::Value* GetValue() const; | 74 const base::Value* GetValue() const; |
75 | 75 |
76 // Returns true if the Preference is managed, i.e. set by an admin policy. | 76 // Returns true if the Preference is managed, i.e. set by an admin policy. |
77 // Since managed prefs have the highest priority, this also indicates | 77 // Since managed prefs have the highest priority, this also indicates |
78 // whether the pref is actually being controlled by the policy setting. | 78 // whether the pref is actually being controlled by the policy setting. |
79 bool IsManaged() const; | 79 bool IsManaged() const; |
80 | 80 |
| 81 // Returns true if the Preference is recommended, i.e. set by an admin |
| 82 // policy but the user is allowed to change it. |
| 83 bool IsRecommended() const; |
| 84 |
81 // Returns true if the Preference has a value set by an extension, even if | 85 // Returns true if the Preference has a value set by an extension, even if |
82 // that value is being overridden by a higher-priority source. | 86 // that value is being overridden by a higher-priority source. |
83 bool HasExtensionSetting() const; | 87 bool HasExtensionSetting() const; |
84 | 88 |
85 // Returns true if the Preference has a user setting, even if that value is | 89 // Returns true if the Preference has a user setting, even if that value is |
86 // being overridden by a higher-priority source. | 90 // being overridden by a higher-priority source. |
87 bool HasUserSetting() const; | 91 bool HasUserSetting() const; |
88 | 92 |
89 // Returns true if the Preference value is currently being controlled by an | 93 // Returns true if the Preference value is currently being controlled by an |
90 // extension, and not by any higher-priority source. | 94 // extension, and not by any higher-priority source. |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 // of registered preferences are. | 394 // of registered preferences are. |
391 mutable PreferenceSet prefs_; | 395 mutable PreferenceSet prefs_; |
392 | 396 |
393 // The model associator that maintains the links with the sync db. | 397 // The model associator that maintains the links with the sync db. |
394 scoped_ptr<PrefModelAssociator> pref_sync_associator_; | 398 scoped_ptr<PrefModelAssociator> pref_sync_associator_; |
395 | 399 |
396 DISALLOW_COPY_AND_ASSIGN(PrefService); | 400 DISALLOW_COPY_AND_ASSIGN(PrefService); |
397 }; | 401 }; |
398 | 402 |
399 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 403 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
OLD | NEW |