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

Unified Diff: chrome/browser/extensions/policy_handlers.h

Issue 2150483004: Plumbing for login apps device policy to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/browser/extensions/external_provider_impl.cc ('k') | chrome/browser/extensions/policy_handlers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/policy_handlers.h
diff --git a/chrome/browser/extensions/policy_handlers.h b/chrome/browser/extensions/policy_handlers.h
index cd7e5d99cc722a8c678b4ea9be0ab9ea08e2de6e..207f20a914b4cb627741a32b11964d33ddd016f5 100644
--- a/chrome/browser/extensions/policy_handlers.h
+++ b/chrome/browser/extensions/policy_handlers.h
@@ -49,27 +49,54 @@ class ExtensionListPolicyHandler
DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler);
};
-class ExtensionInstallForcelistPolicyHandler
+class ExtensionInstallListPolicyHandler
: public policy::TypeCheckingPolicyHandler {
public:
- ExtensionInstallForcelistPolicyHandler();
- ~ExtensionInstallForcelistPolicyHandler() override;
-
// ConfigurationPolicyHandler methods:
bool CheckPolicySettings(const policy::PolicyMap& policies,
policy::PolicyErrorMap* errors) override;
void ApplyPolicySettings(const policy::PolicyMap& policies,
PrefValueMap* prefs) override;
+ protected:
+ ExtensionInstallListPolicyHandler(const char* policy_name,
+ const char* pref_name);
+
+ ~ExtensionInstallListPolicyHandler() override;
+
+ const char* pref_name() const { return pref_name_; }
+
private:
// Parses the data in |policy_value| and writes them to |extension_dict|.
bool ParseList(const base::Value* policy_value,
base::DictionaryValue* extension_dict,
policy::PolicyErrorMap* errors);
+ const char* const pref_name_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionInstallListPolicyHandler);
+};
+
+class ExtensionInstallForcelistPolicyHandler
+ : public ExtensionInstallListPolicyHandler {
+ public:
+ ExtensionInstallForcelistPolicyHandler();
+ ~ExtensionInstallForcelistPolicyHandler() override;
+
+ private:
DISALLOW_COPY_AND_ASSIGN(ExtensionInstallForcelistPolicyHandler);
};
+class ExtensionInstallLoginlistPolicyHandler
+ : public ExtensionInstallListPolicyHandler {
+ public:
+ ExtensionInstallLoginlistPolicyHandler();
+ ~ExtensionInstallLoginlistPolicyHandler() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ExtensionInstallLoginlistPolicyHandler);
+};
+
// Implements additional checks for policies that are lists of extension
// URLPatterns.
class ExtensionURLPatternListPolicyHandler
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/browser/extensions/policy_handlers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698