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

Unified Diff: chrome/browser/extensions/admin_policy.cc

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
Index: chrome/browser/extensions/admin_policy.cc
diff --git a/chrome/browser/extensions/admin_policy.cc b/chrome/browser/extensions/admin_policy.cc
index 0f1e95cad41adac25533c2c4ddc62a24530e74fa..29b978136d272372cfd20c8ecdad18b91589c66a 100644
--- a/chrome/browser/extensions/admin_policy.cc
+++ b/chrome/browser/extensions/admin_policy.cc
@@ -17,7 +17,7 @@ bool ManagementPolicyImpl(const extensions::Extension* extension,
bool modifiable_value) {
bool modifiable =
extension->location() != extensions::Manifest::COMPONENT &&
- extension->location() != extensions::Manifest::EXTERNAL_POLICY_DOWNLOAD;
+ !extensions::Manifest::IsPolicyLocation(extension->location());
// Some callers equate "no restriction" to true, others to false.
if (modifiable)
return modifiable_value;
@@ -61,7 +61,8 @@ bool UserMayLoad(const base::ListValue* blacklist,
return true;
// Forced installed extensions cannot be overwritten manually.
- if (extension->location() != Manifest::EXTERNAL_POLICY_DOWNLOAD &&
+ if (extension->location() != Manifest::EXTERNAL_POLICY &&
+ extension->location() != Manifest::EXTERNAL_POLICY_DOWNLOAD &&
forcelist && forcelist->HasKey(extension->id())) {
return ReturnLoadError(extension, error);
}
« no previous file with comments | « chrome/browser/chromeos/enterprise_extension_observer.cc ('k') | chrome/browser/extensions/api/management/management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698