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

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

Issue 2144313002: Plumbing for login apps device policy to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Devlin feedback Created 3 years, 9 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/extensions/policy_handlers.h
diff --git a/chrome/browser/extensions/policy_handlers.h b/chrome/browser/extensions/policy_handlers.h
index cd7e5d99cc722a8c678b4ea9be0ab9ea08e2de6e..df99405f295d1d524e9edc98d91dd94628fc94a4 100644
--- a/chrome/browser/extensions/policy_handlers.h
+++ b/chrome/browser/extensions/policy_handlers.h
@@ -49,27 +49,55 @@ class ExtensionListPolicyHandler
DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler);
};
-class ExtensionInstallForcelistPolicyHandler
+// Base class for parsing the list of extensions to force install.
+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 = default;
+
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_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionInstallListPolicyHandler);
+};
+
+// Parses the extension force install list for user sessions.
+class ExtensionInstallForcelistPolicyHandler
+ : public ExtensionInstallListPolicyHandler {
+ public:
+ ExtensionInstallForcelistPolicyHandler();
+ ~ExtensionInstallForcelistPolicyHandler() override = default;
+
+ private:
DISALLOW_COPY_AND_ASSIGN(ExtensionInstallForcelistPolicyHandler);
};
+// Parses the extension force install list for the login profile.
+class ExtensionInstallLoginScreenAppListPolicyHandler
+ : public ExtensionInstallListPolicyHandler {
+ public:
+ ExtensionInstallLoginScreenAppListPolicyHandler();
+ ~ExtensionInstallLoginScreenAppListPolicyHandler() override = default;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ExtensionInstallLoginScreenAppListPolicyHandler);
+};
+
// Implements additional checks for policies that are lists of extension
// URLPatterns.
class ExtensionURLPatternListPolicyHandler

Powered by Google App Engine
This is Rietveld 408576698