| Index: chrome/browser/chromeos/login/wizard_controller.cc
|
| diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
|
| index 5f0003199d62b6602fd761078d741e2285c74741..985931affc827fc006d913e821e9d034b27493fa 100644
|
| --- a/chrome/browser/chromeos/login/wizard_controller.cc
|
| +++ b/chrome/browser/chromeos/login/wizard_controller.cc
|
| @@ -70,6 +70,7 @@
|
| #include "chromeos/network/network_state_handler.h"
|
| #include "chromeos/network/portal_detector/network_portal_detector.h"
|
| #include "chromeos/settings/cros_settings_names.h"
|
| +#include "chromeos/settings/cros_settings_provider.h"
|
| #include "chromeos/settings/timezone_settings.h"
|
| #include "components/crash/app/breakpad_linux.h"
|
| #include "components/pairing/bluetooth_controller_pairing_controller.h"
|
| @@ -1089,6 +1090,24 @@ void WizardController::AutoLaunchKioskApp() {
|
| std::string app_id = KioskAppManager::Get()->GetAutoLaunchApp();
|
| CHECK(KioskAppManager::Get()->GetApp(app_id, &app_data));
|
|
|
| + // Wait for the |CrosSettings| to become either trusted or permanently
|
| + // untrusted.
|
| + const CrosSettingsProvider::TrustedStatus status =
|
| + CrosSettings::Get()->PrepareTrustedValues(base::Bind(
|
| + &WizardController::AutoLaunchKioskApp,
|
| + weak_factory_.GetWeakPtr()));
|
| + if (status == CrosSettingsProvider::TEMPORARILY_UNTRUSTED)
|
| + return;
|
| +
|
| + if (status == CrosSettingsProvider::PERMANENTLY_UNTRUSTED) {
|
| + // If the |cros_settings_| are permanently untrusted, show an error message
|
| + // and refuse to auto-launch the kiosk app.
|
| + GetErrorScreen()->SetUIState(ErrorScreen::UI_STATE_LOCAL_STATE_ERROR);
|
| + SetStatusAreaVisible(false);
|
| + ShowErrorScreen();
|
| + return;
|
| + }
|
| +
|
| host_->StartAppLaunch(app_id, false /* diagnostic_mode */);
|
| }
|
|
|
|
|