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..9b0876d798badc8e7a06edf66fb225937a618454 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. |
Luis Héctor Chávez
2017/03/01 22:25:38
nit: return; to avoid the else.
victorhsieh
2017/03/02 00:28:12
L563-564 should still run.
|
+ } else { |
+ if (is_play_store_enabled) |
+ RequestEnable(); |
+ else |
+ RequestDisable(); |
+ } |
for (auto& observer : observer_list_) |
observer.OnArcPlayStoreEnabledChanged(is_play_store_enabled); |
@@ -717,7 +722,7 @@ void ArcSessionManager::RequestEnableImpl() { |
// 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(); |