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

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

Issue 2507073002: Split ArcSessionManager from ArcAuthService. (Closed)
Patch Set: Fix rebase mistake Created 4 years, 1 month 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
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 7345e61d35c25662d4e717aa448468bdbbebd6ca..3c247b5b0d53cbb711b8e1051bb1fda4c0932358 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
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/arc/arc_auth_service.h"
+#include "chrome/browser/chromeos/arc/arc_session_manager.h"
#include "chrome/browser/chromeos/arc/arc_support_host.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/arc/arc_app_launcher.h"
@@ -23,15 +23,16 @@ ArcPlaystoreShortcutLauncherItemController::
ash::ShelfItemDelegate::PerformedAction
ArcPlaystoreShortcutLauncherItemController::Activate(ash::LaunchSource source) {
- arc::ArcAuthService* auth_service = arc::ArcAuthService::Get();
+ arc::ArcSessionManager* arc_session_manager = arc::ArcSessionManager::Get();
+ DCHECK(arc_session_manager);
+ DCHECK(arc_session_manager->IsAllowed());
+
ArcAppListPrefs* arc_app_prefs =
ArcAppListPrefs::Get(controller()->profile());
- DCHECK(auth_service);
DCHECK(arc_app_prefs);
- DCHECK(auth_service->IsAllowed());
- const bool arc_was_enabled = auth_service->IsArcEnabled();
- auth_service->EnableArc();
+ const bool arc_was_enabled = arc_session_manager->IsArcEnabled();
+ arc_session_manager->EnableArc();
// Deferred launcher.
if (arc_app_prefs->IsRegistered(arc::kPlayStoreAppId) && arc_was_enabled) {

Powered by Google App Engine
This is Rietveld 408576698