Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3337)

Unified Diff: chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc

Issue 2751913004: arc: Fix race conditon when Play Store is started too early. (Closed)
Patch Set: nits Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9f445f5319c22b1ff90a6dc2ff5bf216375114b2..cfc048a382d9b007e612e2165ed9e3f61f40affc 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
@@ -6,11 +6,11 @@
#include "base/memory/ptr_util.h"
#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_list_prefs.h"
+#include "chrome/browser/ui/app_list/arc/arc_app_launcher.h"
#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
+#include "ui/events/event_constants.h"
ArcPlaystoreShortcutLauncherItemController::
ArcPlaystoreShortcutLauncherItemController(
@@ -27,15 +27,8 @@ void ArcPlaystoreShortcutLauncherItemController::ItemSelected(
int64_t display_id,
ash::ShelfLaunchSource source,
const ItemSelectedCallback& callback) {
- Profile* profile = controller()->profile();
- ArcAppListPrefs* arc_app_prefs = ArcAppListPrefs::Get(profile);
- DCHECK(arc_app_prefs);
-
- // Play Store should always be registered and arc::LaunchApp can handle all
- // cases.
- DCHECK(arc_app_prefs->IsRegistered(arc::kPlayStoreAppId));
- arc::LaunchApp(profile, arc::kPlayStoreAppId, true);
-
+ playstore_launcher_ = base::MakeUnique<ArcAppLauncher>(
+ controller()->profile(), arc::kPlayStoreAppId, true, true);
callback.Run(ash::SHELF_ACTION_NONE,
GetAppMenuItems(event ? event->flags() : ui::EF_NONE));
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698