| Index: chrome/browser/ui/app_list/arc/arc_app_context_menu.cc
|
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_context_menu.cc b/chrome/browser/ui/app_list/arc/arc_app_context_menu.cc
|
| index ea1dd53efc8d65dc6afff2122ec3f4d8dcfb8507..961673c45abe665f2bbd0e1c14b0cab4a620d299 100644
|
| --- a/chrome/browser/ui/app_list/arc/arc_app_context_menu.cc
|
| +++ b/chrome/browser/ui/app_list/arc/arc_app_context_menu.cc
|
| @@ -4,9 +4,11 @@
|
|
|
| #include "chrome/browser/ui/app_list/arc/arc_app_context_menu.h"
|
|
|
| +#include "base/bind.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/app_list/app_context_menu_delegate.h"
|
| #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
|
| +#include "chrome/browser/ui/app_list/arc/arc_app_dialog.h"
|
| #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
|
| #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
|
| #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h"
|
| @@ -82,7 +84,7 @@ void ArcAppContextMenu::ExecuteCommand(int command_id, int event_flags) {
|
| ArcAppWindowLauncherController::GetShelfAppIdFromArcAppId(app_id()));
|
| break;
|
| case UNINSTALL:
|
| - UninstallPackage();
|
| + arc::ShowArcAppUninstallDialog(profile(), controller(), app_id());
|
| break;
|
| case SHOW_APP_INFO:
|
| ShowPackageInfo();
|
| @@ -92,23 +94,6 @@ void ArcAppContextMenu::ExecuteCommand(int command_id, int event_flags) {
|
| }
|
| }
|
|
|
| -void ArcAppContextMenu::UninstallPackage() {
|
| - ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile());
|
| - DCHECK(arc_prefs);
|
| - std::unique_ptr<ArcAppListPrefs::AppInfo> app_info =
|
| - arc_prefs->GetApp(app_id());
|
| - if (!app_info) {
|
| - VLOG(2) << "Package being uninstalled does not exist: " << app_id() << ".";
|
| - return;
|
| - }
|
| - if (app_info->shortcut) {
|
| - // for shortcut we just remove the shortcut instead of the package
|
| - arc_prefs->RemoveApp(app_id());
|
| - } else {
|
| - arc::UninstallPackage(app_info->package_name);
|
| - }
|
| -}
|
| -
|
| void ArcAppContextMenu::ShowPackageInfo() {
|
| const ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile());
|
| DCHECK(arc_prefs);
|
|
|