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

Unified Diff: extensions/browser/admin_policy.cc

Issue 210473002: Merge 258106 "[Hotword] Making enabling/disabling the setting en..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 9 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/browser/search/hotword_service_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/admin_policy.cc
===================================================================
--- extensions/browser/admin_policy.cc (revision 259015)
+++ extensions/browser/admin_policy.cc (working copy)
@@ -15,8 +15,13 @@
bool ManagementPolicyImpl(const extensions::Extension* extension,
base::string16* error,
bool modifiable_value) {
+ // Note that COMPONENT and EXTERNAL_COMPONENT are treated differently
+ // below. EXTERNAL_COMPONENT extensions can be modified including
+ // enabled, disabled, uninstalled while COMPONENT extensions cannot.
+ // However, those options are only available for EXTERNAL_COMPONENT
+ // extensions when the proper command line flag is passed.
bool modifiable =
- !extensions::Manifest::IsComponentLocation(extension->location()) &&
+ extension->location() != extensions::Manifest::COMPONENT &&
!extensions::Manifest::IsPolicyLocation(extension->location());
// Some callers equate "no restriction" to true, others to false.
if (modifiable)
« no previous file with comments | « chrome/browser/search/hotword_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698