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

Unified Diff: chrome/common/extensions/extension.h

Issue 10382149: Refactor the various ways to control what users can do to extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Addressing comments from partial review Created 8 years, 7 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/common/extensions/extension.h
===================================================================
--- chrome/common/extensions/extension.h (revision 138227)
+++ chrome/common/extensions/extension.h (working copy)
@@ -301,12 +301,14 @@
IsExternalLocation(location);
}
- // Whether extensions with |location| can be uninstalled or not. Policy
- // controlled extensions are silently auto-installed and updated, and cannot
- // be disabled by the user. The same applies for internal components.
- static inline bool UserMayDisable(Location location) {
- return location != Extension::EXTERNAL_POLICY_DOWNLOAD &&
- location != Extension::COMPONENT;
+ // Policy-required extensions are silently auto-installed and updated, and
+ // cannot be disabled or modified by the user in any way. The same applies
+ // to internal components.
+ // This method is not generally called directly; instead, it is accessed
+ // through the ManagementPolicy held by the ExtensionSystem.
+ static inline bool IsRequired(Location location) {
+ return location == Extension::EXTERNAL_POLICY_DOWNLOAD ||
+ location == Extension::COMPONENT;
}
// Whether extensions with |location| should be loaded with strict

Powered by Google App Engine
This is Rietveld 408576698