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

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: 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
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;
emaxx 2016/07/15 13:22:31 I guess, defining the destructor explicitly isn't
achuithb 2016/07/21 00:16:05 I'd like to keep this for consistency with the res
+
+ 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

Powered by Google App Engine
This is Rietveld 408576698