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

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

Issue 2755073003: [Merge M58] arc: Reactivate OptIn flow on clicking Play Store. (Closed)
Patch Set: update unit_tests expectation for M58 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 bd14a6c459aec3c2bd47ab57c53fa1a427643028..8a56ed19b58c3931593504c8d9e502dec26e944c 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 @@ ash::ShelfAction 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 can handle all
+ // cases.
+ DCHECK(arc_app_prefs->IsRegistered(arc::kPlayStoreAppId));
+ arc::LaunchApp(profile, arc::kPlayStoreAppId, true);
return ash::SHELF_ACTION_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