Chromium Code Reviews| Index: chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.cc |
| diff --git a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.cc b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.cc |
| index a2b593fd6a3729537cdd374e8e3613a6e12a1acb..648e1066b151a2fe048527bf7b1b30deaf97f55a 100644 |
| --- a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.cc |
| +++ b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.cc |
| @@ -170,6 +170,10 @@ void ArcKioskAppManager::RemoveObserver(ArcKioskAppManagerObserver* observer) { |
| observers_.RemoveObserver(observer); |
| } |
| +bool ArcKioskAppManager::CurrentAppWasAutoLaunchedWithZeroDelay() const { |
| + return auto_launched_with_zero_delay_; |
| +} |
| + |
| void ArcKioskAppManager::UpdateApps() { |
| // Do not populate ARC kiosk apps if ARC kiosk apps can't be run on the |
| // device. |
| @@ -184,6 +188,7 @@ void ArcKioskAppManager::UpdateApps() { |
| ArcKioskApps old_apps(std::move(apps_)); |
| auto_launch_account_id_.clear(); |
| + auto_launched_with_zero_delay_ = false; |
| std::string auto_login_account_id_from_settings; |
| CrosSettings::Get()->GetString(kAccountsPrefDeviceLocalAccountAutoLoginId, |
| &auto_login_account_id_from_settings); |
| @@ -197,8 +202,14 @@ void ArcKioskAppManager::UpdateApps() { |
| const AccountId account_id(AccountId::FromUserEmail(account.user_id)); |
| - if (account.account_id == auto_login_account_id_from_settings) |
| + if (account.account_id == auto_login_account_id_from_settings) { |
| auto_launch_account_id_ = account_id; |
| + int auto_launch_delay = 0; |
| + CrosSettings::Get()->GetInteger( |
| + kAccountsPrefDeviceLocalAccountAutoLoginDelay, &auto_launch_delay); |
| + if (auto_launch_delay == 0) |
|
Luis Héctor Chávez
2017/03/17 17:46:54
nit: auto_launched_with_zero_delay_ = auto_launch_
Ivan Šandrk
2017/03/20 13:22:58
Done.
|
| + auto_launched_with_zero_delay_ = true; |
| + } |
| auto old_it = |
| std::find(old_apps.begin(), old_apps.end(), account.arc_kiosk_app_info); |