Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc |
| diff --git a/chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc |
| index 0ab7bdcc27b10dae8a44e04fc8a35f531115e798..c00e684d33531c63982678b7e121d5d3d60e7282 100644 |
| --- a/chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc |
| +++ b/chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc |
| @@ -8,7 +8,6 @@ |
| #include "chrome/browser/chromeos/arc/arc_support_host.h" |
| #include "chrome/browser/chromeos/arc/arc_util.h" |
| #include "chrome/browser/profiles/profile.h" |
| -#include "chrome/browser/ui/app_list/arc/arc_app_launcher.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/chrome_launcher_controller.h" |
| @@ -32,20 +31,10 @@ void ArcPlaystoreShortcutLauncherItemController::ItemSelected( |
| ArcAppListPrefs* arc_app_prefs = ArcAppListPrefs::Get(profile); |
| DCHECK(arc_app_prefs); |
| - const bool play_store_was_enabled = |
| - arc::IsArcPlayStoreEnabledForProfile(profile); |
| - arc::SetArcPlayStoreEnabledForProfile(profile, true); |
| - |
| - // Deferred launcher. |
| - if (arc_app_prefs->IsRegistered(arc::kPlayStoreAppId) && |
| - play_store_was_enabled) { |
| - // Known apps can be launched directly or deferred. |
| - arc::LaunchApp(profile, arc::kPlayStoreAppId, true); |
| - } else { |
| - // Launch Play Store once its app appears. |
| - playstore_launcher_ = |
| - base::MakeUnique<ArcAppLauncher>(profile, arc::kPlayStoreAppId, true); |
| - } |
| + // Play Store should always be registered and arc::LaunchApp handles can |
|
Yusuke Sato
2017/03/13 18:05:56
nit: s/handles// ?
khmel
2017/03/13 19:44:19
Done.
|
| + // handle all cases. |
| + DCHECK(arc_app_prefs->IsRegistered(arc::kPlayStoreAppId)); |
| + arc::LaunchApp(profile, arc::kPlayStoreAppId, true); |
| callback.Run(ash::SHELF_ACTION_NONE, |
| GetAppMenuItems(event ? event->flags() : ui::EF_NONE)); |