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

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: minor Created 3 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/extensions/policy_handlers.h
diff --git a/chrome/browser/extensions/policy_handlers.h b/chrome/browser/extensions/policy_handlers.h
index cd7e5d99cc722a8c678b4ea9be0ab9ea08e2de6e..2483e2ddaff354bbdbf3f73b1c51e2b9cdcd7ba2 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
emaxx 2017/02/21 19:44:10 nit: Maybe add comments to explain what this class
achuithb 2017/02/22 14:39:34 Done.
: 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,
emaxx 2017/02/21 19:44:10 nit: I believe std::string is used much more often
achuithb 2017/02/22 14:39:34 I'm happy to change this if you insist, but this i
emaxx 2017/02/24 04:12:40 Acknowledged.
+ const char* pref_name);
+
+ ~ExtensionInstallListPolicyHandler() override = default;
+
+ 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_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionInstallListPolicyHandler);
+};
+
+class ExtensionInstallForcelistPolicyHandler
+ : public ExtensionInstallListPolicyHandler {
+ public:
+ ExtensionInstallForcelistPolicyHandler();
+ ~ExtensionInstallForcelistPolicyHandler() override = default;
+
+ private:
DISALLOW_COPY_AND_ASSIGN(ExtensionInstallForcelistPolicyHandler);
};
+class ExtensionInstallLoginlistPolicyHandler
+ : public ExtensionInstallListPolicyHandler {
+ public:
+ ExtensionInstallLoginlistPolicyHandler();
+ ~ExtensionInstallLoginlistPolicyHandler() override = default;
+
+ 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