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

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

Issue 2707133006: Start ARC and sign in after Chrome OS login (Closed)
Patch Set: rename flag Created 3 years, 10 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 188178440bb0e7a94ab85d7a1372dab6a179beff..b90f91257dbb8805274d0b600e4cecc233f7a2eb 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc
@@ -21,6 +21,7 @@
#include "chromeos/dbus/session_manager_client.h"
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_service_manager.h"
+#include "components/arc/arc_util.h"
#include "components/arc/common/intent_helper.mojom.h"
#include "ui/aura/window.h"
#include "ui/display/display.h"
@@ -270,17 +271,21 @@ bool LaunchApp(content::BrowserContext* context,
bool arc_activated = false;
if (!arc_session_manager->IsArcPlayStoreEnabled()) {
- if (!prefs->IsDefault(app_id)) {
- NOTREACHED();
- return false;
+ if (prefs->IsDefault(app_id)) {
+ arc_session_manager->SetArcPlayStoreEnabled(true);
+ if (!arc_session_manager->IsArcPlayStoreEnabled()) {
+ NOTREACHED();
+ return false;
+ }
+ arc_activated = true;
+ } else {
+ if (arc::ShouldArcAlwaysStart()) {
hidehiko 2017/02/28 19:26:07 nit: "guard" is preferred in ARC code. So, how abo
victorhsieh 2017/02/28 21:47:06 Done.
+ arc_activated = true;
+ } else {
+ NOTREACHED();
+ return false;
+ }
}
-
- arc_session_manager->SetArcPlayStoreEnabled(true);
- if (!arc_session_manager->IsArcPlayStoreEnabled()) {
- NOTREACHED();
- return false;
- }
- arc_activated = true;
}
// PlayStore item has special handling for shelf controllers. In order to

Powered by Google App Engine
This is Rietveld 408576698