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

Unified Diff: extensions/browser/admin_policy.cc

Issue 196753002: [Hotword] Making enabling/disabling the setting enable/disable the hotword extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: undo profile resetter unittest change, but modify behavior when disabling extensions 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
Index: extensions/browser/admin_policy.cc
diff --git a/extensions/browser/admin_policy.cc b/extensions/browser/admin_policy.cc
index cb948879aa7aea51d6d2b0e4fc564ed9a4129391..e2ecce259bf450b0752e0f6305a59bb82c6b5ada 100644
--- a/extensions/browser/admin_policy.cc
+++ b/extensions/browser/admin_policy.cc
@@ -15,8 +15,13 @@ namespace {
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.
miket_OOO 2014/03/17 20:10:51 Great! Thanks.
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)
« chrome/browser/search/hotword_service.cc ('K') | « 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