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

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

Issue 10821047: Provide access to recommended pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits addressed. Created 8 years, 4 months 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) 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // browser.window_placement). 79 // browser.window_placement).
80 const std::string name() const { return name_; } 80 const std::string name() const { return name_; }
81 81
82 // Returns the registered type of the preference. 82 // Returns the registered type of the preference.
83 base::Value::Type GetType() const; 83 base::Value::Type GetType() const;
84 84
85 // Returns the value of the Preference, falling back to the registered 85 // Returns the value of the Preference, falling back to the registered
86 // default value if no other has been set. 86 // default value if no other has been set.
87 const base::Value* GetValue() const; 87 const base::Value* GetValue() const;
88 88
89 // Returns the value recommended by the admin, if any.
90 const base::Value* GetRecommendedValue() const;
91
89 // Returns true if the Preference is managed, i.e. set by an admin policy. 92 // Returns true if the Preference is managed, i.e. set by an admin policy.
90 // Since managed prefs have the highest priority, this also indicates 93 // Since managed prefs have the highest priority, this also indicates
91 // whether the pref is actually being controlled by the policy setting. 94 // whether the pref is actually being controlled by the policy setting.
92 bool IsManaged() const; 95 bool IsManaged() const;
93 96
94 // Returns true if the Preference is recommended, i.e. set by an admin 97 // Returns true if the Preference is recommended, i.e. set by an admin
95 // policy but the user is allowed to change it. 98 // policy but the user is allowed to change it.
96 bool IsRecommended() const; 99 bool IsRecommended() const;
97 100
98 // Returns true if the Preference has a value set by an extension, even if 101 // Returns true if the Preference has a value set by an extension, even if
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 433
431 // Whether CreateIncognitoPrefService() or 434 // Whether CreateIncognitoPrefService() or
432 // CreatePrefServiceWithPerTabPrefStore() have been called to create a 435 // CreatePrefServiceWithPerTabPrefStore() have been called to create a
433 // "forked" PrefService. 436 // "forked" PrefService.
434 bool pref_service_forked_; 437 bool pref_service_forked_;
435 438
436 DISALLOW_COPY_AND_ASSIGN(PrefService); 439 DISALLOW_COPY_AND_ASSIGN(PrefService);
437 }; 440 };
438 441
439 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ 442 #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