Index: chrome/browser/ui/app_list/arc/arc_app_utils.cc |
diff --git a/chrome/browser/ui/app_list/arc/arc_app_utils.cc b/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
index 7a3d454e714cabd9a235c0864939b9e5c1ab9426..12204f33f7b5fbc7dd5b4dabebe0b4b45200c7ab 100644 |
--- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
+++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
@@ -224,6 +224,22 @@ bool LaunchApp(content::BrowserContext* context, |
if (!ash::Shell::HasInstance()) |
return false; |
+ ArcAuthService* auth_service = ArcAuthService::Get(); |
+ DCHECK(auth_service); |
+ |
+ if (!auth_service->IsArcEnabled()) { |
+ if (!prefs->IsDefault(app_id)) { |
+ NOTREACHED(); |
+ return false; |
+ } |
+ |
+ auth_service->EnableArc(); |
+ if (!auth_service->IsArcEnabled()) { |
+ NOTREACHED(); |
+ return false; |
+ } |
+ } |
+ |
ChromeLauncherController* chrome_controller = |
ChromeLauncherController::instance(); |
DCHECK(chrome_controller); |