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

Unified Diff: chrome/browser/ui/app_list/app_list_syncable_service.cc

Issue 405433003: Apps&Extensions for supervised users: Allow the custodian to remotely uninstall extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test Created 6 years, 5 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/extensions/extension_sync_service.cc ('k') | extensions/browser/uninstall_reason.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_list_syncable_service.cc
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.cc b/chrome/browser/ui/app_list/app_list_syncable_service.cc
index c1a03b6d6860343dffd8de27b81f935cd33d711a..f9f256152380bb71c47f5d87074ba879e5f198f7 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service.cc
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.cc
@@ -117,8 +117,16 @@ bool IsUnRemovableDefaultApp(const std::string& id) {
}
void UninstallExtension(ExtensionService* service, const std::string& id) {
- if (service && service->GetInstalledExtension(id))
- service->UninstallExtension(id, extensions::UNINSTALL_REASON_SYNC, NULL);
+
+ const extensions::Extension* extension =
+ service ? service->GetInstalledExtension(id) : NULL;
+ if (extension) {
+ extensions::UninstallReason reason =
+ extension->was_installed_by_custodian() ?
+ extensions::UNINSTALL_REASON_SYNC_BY_CUSTODIAN :
+ extensions::UNINSTALL_REASON_SYNC;
+ service->UninstallExtension(id, reason, NULL);
stevenjb 2014/07/22 00:47:58 It seems like this should be automatic, or there s
Marc Treib 2014/07/22 09:30:07 Ack. With the change suggested by kalman, this has
+ }
}
bool GetAppListItemType(AppListItem* item,
« no previous file with comments | « chrome/browser/extensions/extension_sync_service.cc ('k') | extensions/browser/uninstall_reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698