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

Unified Diff: chrome/browser/policy/configuration_policy_handler.h

Issue 12217068: Add policies to control Chrome OS power management (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/configuration_policy_handler.h
diff --git a/chrome/browser/policy/configuration_policy_handler.h b/chrome/browser/policy/configuration_policy_handler.h
index 8d75ddfb32c98bcae425a2e0c5b2cd1e15846c48..98efaf2fa57d12ac1e5830f2dbb10cd90ed9a8fd 100644
--- a/chrome/browser/policy/configuration_policy_handler.h
+++ b/chrome/browser/policy/configuration_policy_handler.h
@@ -137,6 +137,24 @@ class StringToIntEnumListPolicyHandler : public TypeCheckingPolicyHandler {
DISALLOW_COPY_AND_ASSIGN(StringToIntEnumListPolicyHandler);
};
+// A policy handler implementation that maps an int percentage value to a
+// double.
+class IntPercentageToDoublePolicyHandler : public TypeCheckingPolicyHandler {
+ public:
+ IntPercentageToDoublePolicyHandler(const char* policy_name,
+ const char* pref_path);
+
+ // ConfigurationPolicyHandler:
+ virtual void ApplyPolicySettings(const PolicyMap& policies,
+ PrefValueMap* prefs) OVERRIDE;
+
+ private:
+ // Name of the pref to write.
+ const char* pref_path_;
+
+ DISALLOW_COPY_AND_ASSIGN(IntPercentageToDoublePolicyHandler);
+};
+
// Implements additional checks for policies that are lists of extension IDs.
class ExtensionListPolicyHandler : public TypeCheckingPolicyHandler {
public:

Powered by Google App Engine
This is Rietveld 408576698