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 2f0cddaef010e47808f3f79a8c9ae91ce68a3d63..62da816edbbc3098639556c8d6333bee5c8ac12a 100644 |
--- a/chrome/browser/ui/app_list/app_list_syncable_service.cc |
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.cc |
@@ -116,9 +116,15 @@ bool IsUnRemovableDefaultApp(const std::string& id) { |
} |
void UninstallExtension(ExtensionService* service, const std::string& id) { |
- if (service && service->GetInstalledExtension(id)) |
- service->UninstallExtension( |
- id, ExtensionService::UNINSTALL_REASON_SYNC, NULL); |
+ const extensions::Extension* extension = |
+ service ? service->GetInstalledExtension(id) : NULL; |
+ if (extension) { |
+ ExtensionService::UninstallReason reason = |
+ extension->was_installed_by_custodian() ? |
+ ExtensionService::UNINSTALL_REASON_SYNC_BY_CUSTODIAN : |
+ ExtensionService::UNINSTALL_REASON_SYNC; |
+ service->UninstallExtension(id, reason, NULL); |
+ } |
} |
bool GetAppListItemType(AppListItem* item, |