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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_utils.cc

Issue 2322683003: [Merge-M54] arc: Add support of default and OEM apps. (Closed)
Patch Set: Created 4 years, 3 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
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 e299c54883060672fc871e7fdbd9036ec4d6551d..cabb267117349f66fe9daa20b24ad269ea836dc4 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc
@@ -225,6 +225,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);
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_unittest.cc ('k') | chrome/browser/ui/app_list/arc/arc_default_app_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698