| Index: chrome/browser/chromeos/arc/arc_session_manager.cc
|
| diff --git a/chrome/browser/chromeos/arc/arc_session_manager.cc b/chrome/browser/chromeos/arc/arc_session_manager.cc
|
| index 4e4ec241d8ecce91df78072dc59b1317ab96673c..17dafac6871219e811e7066e9bc7cbb360d295aa 100644
|
| --- a/chrome/browser/chromeos/arc/arc_session_manager.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
|
| @@ -496,7 +496,7 @@ void ArcSessionManager::StartPreferenceHandler() {
|
| }
|
|
|
| // Update the state based on the initial Google Play Store enabled value.
|
| - if (IsArcPlayStoreEnabledForProfile(profile_)) {
|
| + if (ShouldArcAlwaysStart() || IsArcPlayStoreEnabledForProfile(profile_)) {
|
| VLOG(1) << "ARC is already enabled.";
|
| DCHECK(!enable_requested_);
|
| RequestEnable();
|
| @@ -550,10 +550,15 @@ void ArcSessionManager::OnOptInPreferenceChanged() {
|
| if (profile_->GetPrefs()->HasPrefPath(prefs::kArcEnabled))
|
| ArcAuthNotification::Hide();
|
|
|
| - if (is_play_store_enabled)
|
| - RequestEnable();
|
| - else
|
| - RequestDisable();
|
| + if (ShouldArcAlwaysStart()) {
|
| + // TODO(victorhsieh): Implement opt-in and opt-out flow. For now, do
|
| + // nothing but keep the existing ARC instance running.
|
| + } else {
|
| + if (is_play_store_enabled)
|
| + RequestEnable();
|
| + else
|
| + RequestDisable();
|
| + }
|
|
|
| for (auto& observer : observer_list_)
|
| observer.OnArcPlayStoreEnabledChanged(is_play_store_enabled);
|
| @@ -712,12 +717,12 @@ void ArcSessionManager::RequestEnableImpl() {
|
| if (AreArcAllOptInPreferencesManaged())
|
| prefs->SetBoolean(prefs::kArcTermsAccepted, true);
|
|
|
| - // If it is marked that sign in has been successfully done, then directly
|
| - // start ARC.
|
| + // If it is marked that sign in has been successfully done, if ARC has been
|
| + // set up to always start, then directly start ARC.
|
| // For testing, and for Kiosk mode, we also skip ToS negotiation procedure.
|
| // For backward compatibility, this check needs to be prior to the
|
| // kArcTermsAccepted check below.
|
| - if (prefs->GetBoolean(prefs::kArcSignedIn) ||
|
| + if (prefs->GetBoolean(prefs::kArcSignedIn) || ShouldArcAlwaysStart() ||
|
| IsArcOptInVerificationDisabled() || IsArcKioskMode()) {
|
| StartArc();
|
|
|
|
|