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 a4eb8be47e35a2c27ec3fc600a1b1f4687033674..9211776d49fd34b0ac494754308399cc6bc743ee 100644 |
| --- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| +++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| @@ -12,6 +12,7 @@ |
| #include "base/json/json_writer.h" |
| #include "base/synchronization/waitable_event.h" |
| #include "base/values.h" |
| +#include "chrome/browser/chromeos/arc/arc_session_manager.h" |
| #include "chrome/browser/chromeos/arc/arc_util.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| @@ -289,6 +290,17 @@ bool LaunchApp(content::BrowserContext* context, |
| // Only reachable when ARC always starts. |
| DCHECK(arc::ShouldArcAlwaysStart()); |
| } |
| + } else { |
| + // Handle the case when default app tries to re-activate OptIn flow. |
| + if (IsArcPlayStoreEnabledPreferenceManagedForProfile(profile) && |
| + !ArcSessionManager::Get()->enable_requested() && |
| + prefs->IsDefault(app_id)) { |
| + SetArcPlayStoreEnabledForProfile(profile, true); |
| + if (app_id == kPlayStoreAppId) { |
|
Yusuke Sato
2017/03/13 18:05:56
qq: When this can be false? Is it okay to execute
khmel
2017/03/13 19:44:19
Another default app may activate this flow, for ex
Yusuke Sato
2017/03/13 20:08:18
Can you copy the summary of your comment to the co
khmel
2017/03/13 21:42:34
Done.
|
| + prefs->SetLastLaunchTime(app_id, base::Time::Now()); |
| + return true; |
| + } |
| + } |
| } |
| ChromeLauncherController* chrome_controller = |