Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: chrome/browser/prefs/pref_service.h

Issue 8896023: Fixed the value of "controlledBy" for preferences when they're set by the user. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698