Index: chrome/browser/chromeos/login/arc_kiosk_controller.cc |
diff --git a/chrome/browser/chromeos/login/arc_kiosk_controller.cc b/chrome/browser/chromeos/login/arc_kiosk_controller.cc |
index da04f6ec93c2f2ac48b9890755eced753b21c537..9040e701a7ed5a57a52012489f009f6335228ab4 100644 |
--- a/chrome/browser/chromeos/login/arc_kiosk_controller.cc |
+++ b/chrome/browser/chromeos/login/arc_kiosk_controller.cc |
@@ -33,7 +33,8 @@ ArcKioskController::~ArcKioskController() { |
arc_kiosk_splash_screen_view_->SetDelegate(nullptr); |
} |
-void ArcKioskController::StartArcKiosk(const AccountId& account_id) { |
+void ArcKioskController::StartArcKiosk(const AccountId& account_id, |
+ bool is_auto_launch) { |
DVLOG(1) << "Starting ARC Kiosk for account: " << account_id.GetUserEmail(); |
host_->GetWebUILoginView()->SetUIEnabled(true); |
@@ -44,6 +45,19 @@ void ArcKioskController::StartArcKiosk(const AccountId& account_id) { |
base::Bind(&ArcKioskController::CloseSplashScreen, |
weak_ptr_factory_.GetWeakPtr())); |
+ if (is_auto_launch) { |
Ivan Šandrk
2017/03/16 18:30:43
If I rely on auto_launch_account_id_, I can skip t
|
+ int auto_launch_delay = -1; |
Luis Héctor Chávez
2017/03/16 19:42:30
nit: why not do
int auto_launch_delay = 0;
CrosSe
Ivan Šandrk
2017/03/16 22:32:50
I guess I was going by this code and tried replica
|
+ if (!CrosSettings::Get()->GetInteger( |
+ kAccountsPrefDeviceLocalAccountAutoLoginDelay, |
Luis Héctor Chávez
2017/03/16 19:42:30
dumb question: can you not get this from ArcKioskA
Ivan Šandrk
2017/03/16 22:32:49
Good question! It did cross my mind actually, that
|
+ &auto_launch_delay)) { |
+ auto_launch_delay = 0; |
+ } |
+ |
+ // Mark arc kiosk app launched with zero delay. |
+ if (auto_launch_delay == 0) |
+ ArcKioskAppManager::Get()->SetWasAutoLaunchedWithZeroDelay(account_id); |
+ } |
+ |
login_performer_ = base::MakeUnique<ChromeLoginPerformer>(this); |
login_performer_->LoginAsArcKioskAccount(account_id); |
} |