Chromium Code Reviews| 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..78c169a423d907959467641732a16e1a4de50231 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,20 @@ bool LaunchApp(content::BrowserContext* context, |
| bool arc_activated = false; |
|
khmel
2017/02/28 21:58:44
Please add TODO or rename to something like play_s
victorhsieh
2017/02/28 23:43:16
Revised to make these more clear as discussed offl
|
| 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()) { |
| + NOTREACHED(); |
| + return false; |
| + } |
| + arc_activated = true; |
| } |
| - |
| - 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 |