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

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

Issue 54903011: Add management policy function allowing extensions to be disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/management_policy.h
diff --git a/chrome/browser/extensions/management_policy.h b/chrome/browser/extensions/management_policy.h
index 6b0847d0c67f30ce7a32d9ecd8f5c6265126b49f..5a1de2c1154e3a5cfa04a6504317a275a3a58193 100644
--- a/chrome/browser/extensions/management_policy.h
+++ b/chrome/browser/extensions/management_policy.h
@@ -68,6 +68,12 @@ class ManagementPolicy {
virtual bool MustRemainEnabled(const Extension* extension,
string16* error) const;
+ // Similar to MustRemainEnabled, but for whether an extension must remain
+ // disabled, and returns an error and/or reason if the caller needs it.
+ virtual bool MustRemainDisabled(const Extension* extension,
+ Extension::DisableReason* reason,
+ string16* error) const;
+
private:
DISALLOW_COPY_AND_ASSIGN(Provider);
};
@@ -97,6 +103,12 @@ class ManagementPolicy {
bool MustRemainEnabled(const Extension* extension,
string16* error) const;
+ // Returns true immediately if any registered provider's MustRemainDisabled
+ // function returns true.
+ bool MustRemainDisabled(const Extension* extension,
+ Extension::DisableReason* reason,
+ string16* error) const;
+
// For use in testing.
void UnregisterAllProviders();
int GetNumProviders() const;

Powered by Google App Engine
This is Rietveld 408576698