Chromium Code Reviews| 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 0932d2cfa7a82b8ae2a448c170f8597bc6515760..30d2bfecd32bb195e669b9ee2596975c096e6cbf 100644 |
| --- a/chrome/browser/ui/app_list/app_list_syncable_service.cc |
| +++ b/chrome/browser/ui/app_list/app_list_syncable_service.cc |
| @@ -19,6 +19,7 @@ |
| #include "chrome/common/extensions/extension_constants.h" |
| #include "chrome/grit/generated_resources.h" |
| #include "extensions/browser/extension_prefs.h" |
| +#include "extensions/browser/extension_registry.h" |
| #include "extensions/browser/extension_system.h" |
| #include "extensions/browser/uninstall_reason.h" |
| #include "extensions/common/constants.h" |
| @@ -121,7 +122,12 @@ bool IsUnRemovableDefaultApp(const std::string& id) { |
| } |
| void UninstallExtension(ExtensionService* service, const std::string& id) { |
| - if (service && service->GetInstalledExtension(id)) { |
| + if (service) { |
| + const extensions::Extension* extension = |
| + extensions::ExtensionRegistry::Get(service->profile()) |
| + ->GetExtensionById(id, extensions::ExtensionRegistry::EVERYTHING); |
| + if (!extension) |
| + return; |
|
stevenjb
2015/05/26 21:26:25
We should either move this check to service->Unins
babu
2015/06/04 14:48:11
Thanks for reviewing!
UninstallExtension() has t
|
| service->UninstallExtension(id, |
| extensions::UNINSTALL_REASON_SYNC, |
| base::Bind(&base::DoNothing), |