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

Unified Diff: extensions/common/manifest.h

Issue 24365004: Add EXTERNAL_POLICY to list of possible extension locations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. Created 7 years, 3 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
« no previous file with comments | « chrome/common/extensions/extension_unittest.cc ('k') | extensions/common/manifest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/manifest.h
diff --git a/extensions/common/manifest.h b/extensions/common/manifest.h
index c4ceb3870cc800c4c18c85b2c00af9c5cc9b265f..4bf92ec7018d88e377f0e7d63c56311e83119245 100644
--- a/extensions/common/manifest.h
+++ b/extensions/common/manifest.h
@@ -40,6 +40,9 @@ class Manifest {
EXTERNAL_POLICY_DOWNLOAD, // A crx file from an external directory (via
// admin policies), installed from an update URL.
COMMAND_LINE, // --load-extension.
+ EXTERNAL_POLICY, // A crx file from an external directory (via admin
+ // policies), cached locally and installed from the
+ // cache.
NUM_LOCATIONS
};
@@ -69,6 +72,7 @@ class Manifest {
return location == EXTERNAL_PREF ||
location == EXTERNAL_REGISTRY ||
location == EXTERNAL_PREF_DOWNLOAD ||
+ location == EXTERNAL_POLICY ||
location == EXTERNAL_POLICY_DOWNLOAD;
}
@@ -84,6 +88,12 @@ class Manifest {
IsExternalLocation(location);
}
+ // Whether the |location| is a source of extensions force-installed through
+ // policy.
+ static inline bool IsPolicyLocation(Location location) {
+ return location == EXTERNAL_POLICY || location == EXTERNAL_POLICY_DOWNLOAD;
+ }
+
// Unpacked extensions start off with file access since they are a developer
// feature.
static inline bool ShouldAlwaysAllowFileAccess(Location location) {
« no previous file with comments | « chrome/common/extensions/extension_unittest.cc ('k') | extensions/common/manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698