Chromium Code Reviews| Index: chrome/browser/ui/app_list/extension_uninstaller.cc |
| diff --git a/chrome/browser/ui/app_list/extension_uninstaller.cc b/chrome/browser/ui/app_list/extension_uninstaller.cc |
| index d4c0ea0b9aa0740bd5eba6ccc756d70e95341726..a2534ebd43ca4ca8f7c71879ad30a707eb5450f7 100644 |
| --- a/chrome/browser/ui/app_list/extension_uninstaller.cc |
| +++ b/chrome/browser/ui/app_list/extension_uninstaller.cc |
| @@ -7,6 +7,7 @@ |
| #include "chrome/browser/extensions/extension_service.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
| +#include "extensions/browser/extension_registry.h" |
| #include "extensions/browser/extension_system.h" |
| #include "extensions/browser/uninstall_reason.h" |
| #include "extensions/common/extension.h" |
| @@ -25,8 +26,9 @@ ExtensionUninstaller::~ExtensionUninstaller() { |
| void ExtensionUninstaller::Run() { |
| const extensions::Extension* extension = |
| - extensions::ExtensionSystem::Get(profile_)->extension_service()-> |
| - GetInstalledExtension(app_id_); |
| + extensions::ExtensionRegistry::Get(profile_)->GetExtensionById( |
| + app_id_, |
| + extensions::ExtensionRegistry::EVERYTHING); |
| if (!extension) { |
| CleanUp(); |
| return; |
| @@ -38,11 +40,13 @@ void ExtensionUninstaller::Run() { |
| } |
| void ExtensionUninstaller::ExtensionUninstallAccepted() { |
| - ExtensionService* service = |
| - extensions::ExtensionSystem::Get(profile_)->extension_service(); |
| const extensions::Extension* extension = |
| - service->GetInstalledExtension(app_id_); |
| + extensions::ExtensionRegistry::Get(profile_)->GetExtensionById( |
| + app_id_, |
| + extensions::ExtensionRegistry::EVERYTHING); |
| if (extension) { |
| + ExtensionService* service = |
| + extensions::ExtensionSystem::Get(profile_)->extension_service(); |
|
stevenjb
2015/05/26 21:26:25
Same comment; we shouldn't have to check Extension
babu
2015/06/04 14:48:11
Code has changed and this change is no longer need
|
| service->UninstallExtension(app_id_, |
| extensions::UNINSTALL_REASON_USER_INITIATED, |
| base::Bind(&base::DoNothing), |