| Index: chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
|
| diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
|
| index 86affa2eb9a99c32f645f77589b9fa93f1a44c5b..e84dff2ec3e220fdc1f6456e1a7ee03b62f05d1e 100644
|
| --- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
|
| +++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
|
| @@ -100,15 +100,21 @@ void KioskAppManager::RegisterPrefs(PrefRegistrySimple* registry) {
|
| registry->RegisterDictionaryPref(kKioskDictionaryName);
|
| }
|
|
|
| -KioskAppManager::App::App(const KioskAppData& data, bool is_extension_pending)
|
| +KioskAppManager::App::App(
|
| + const KioskAppData& data,
|
| + bool is_extension_pending,
|
| + bool auto_launched_with_zero_delay)
|
| : app_id(data.app_id()),
|
| user_id(data.user_id()),
|
| name(data.name()),
|
| icon(data.icon()),
|
| - is_loading(data.IsLoading() || is_extension_pending) {
|
| + is_loading(data.IsLoading() || is_extension_pending),
|
| + was_auto_launched_with_zero_delay(auto_launched_with_zero_delay) {
|
| }
|
|
|
| -KioskAppManager::App::App() : is_loading(false) {}
|
| +KioskAppManager::App::App() : is_loading(false),
|
| + was_auto_launched_with_zero_delay(false) {}
|
| +
|
| KioskAppManager::App::~App() {}
|
|
|
| std::string KioskAppManager::GetAutoLaunchApp() const {
|
| @@ -131,6 +137,12 @@ void KioskAppManager::SetAutoLaunchApp(const std::string& app_id) {
|
| kAccountsPrefDeviceLocalAccountAutoLoginDelay, 0);
|
| }
|
|
|
| +void KioskAppManager::SetAppWasAutoLaunchedWithZeroDelay(
|
| + const std::string& app_id) {
|
| + DCHECK_EQ(auto_launch_app_id_, app_id);
|
| + currently_auto_launched_with_zero_delay_app_ = app_id;
|
| +}
|
| +
|
| void KioskAppManager::EnableConsumerKioskAutoLaunch(
|
| const KioskAppManager::EnableKioskAutoLaunchCallback& callback) {
|
| policy::BrowserPolicyConnectorChromeOS* connector =
|
| @@ -311,9 +323,11 @@ void KioskAppManager::GetApps(Apps* apps) const {
|
| apps->reserve(apps_.size());
|
| for (size_t i = 0; i < apps_.size(); ++i) {
|
| const KioskAppData& app_data = *apps_[i];
|
| - if (app_data.status() != KioskAppData::STATUS_ERROR)
|
| + if (app_data.status() != KioskAppData::STATUS_ERROR) {
|
| apps->push_back(App(
|
| - app_data, external_cache_->IsExtensionPending(app_data.app_id())));
|
| + app_data, external_cache_->IsExtensionPending(app_data.app_id()),
|
| + app_data.app_id() == currently_auto_launched_with_zero_delay_app_));
|
| + }
|
| }
|
| }
|
|
|
| @@ -322,7 +336,8 @@ bool KioskAppManager::GetApp(const std::string& app_id, App* app) const {
|
| if (!data)
|
| return false;
|
|
|
| - *app = App(*data, external_cache_->IsExtensionPending(app_id));
|
| + *app = App(*data, external_cache_->IsExtensionPending(app_id),
|
| + app_id == currently_auto_launched_with_zero_delay_app_);
|
| return true;
|
| }
|
|
|
|
|