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

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

Issue 10316022: Wire up the policy for controlling pinned apps in the ash launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/policy/configuration_policy_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 049e9a267141f85701c096f33a10b0b0187be420..8ddf542209d5b10421c2acdf39ac5dd6ffdb3b17 100644
--- a/chrome/browser/policy/configuration_policy_handler.h
+++ b/chrome/browser/policy/configuration_policy_handler.h
@@ -99,6 +99,35 @@ class SimplePolicyHandler : public TypeCheckingPolicyHandler {
DISALLOW_COPY_AND_ASSIGN(SimplePolicyHandler);
};
+// Implements additional checks for policies that are lists of extension IDs.
+class ExtensionListPolicyHandler : public TypeCheckingPolicyHandler {
+ public:
+ ExtensionListPolicyHandler(const char* policy_name,
+ const char* pref_path,
+ bool allow_wildcards);
+ virtual ~ExtensionListPolicyHandler();
+
+ // ConfigurationPolicyHandler methods:
+ virtual bool CheckPolicySettings(const PolicyMap& policies,
+ PolicyErrorMap* errors) OVERRIDE;
+ virtual void ApplyPolicySettings(const PolicyMap& policies,
+ PrefValueMap* prefs) OVERRIDE;
+
+ protected:
+ const char* pref_path() const;
+
+ // Runs sanity checks on the policy value and returns it in |extension_ids|.
+ bool CheckAndGetList(const PolicyMap& policies,
+ PolicyErrorMap* errors,
+ const base::ListValue** extension_ids);
+
+ private:
+ const char* pref_path_;
+ bool allow_wildcards_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler);
+};
+
// ConfigurationPolicyHandler for the SyncDisabled policy.
class SyncPolicyHandler : public TypeCheckingPolicyHandler {
public:
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/policy/configuration_policy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698