Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager.cc

Issue 1865133002: kiosk: Fix kiosk session restart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 62ebcdb0e5434e6db861a7151f119150ca53d971..ab3da1a62f688d38261d909fffff45c862e641ae 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
@@ -426,11 +426,28 @@ bool KioskAppManager::GetApp(const std::string& app_id, App* app) const {
if (!data)
return false;
- *app = App(*data, external_cache_->IsExtensionPending(app_id),
- app_id == currently_auto_launched_with_zero_delay_app_);
+ if (app) {
+ *app = App(*data, external_cache_->IsExtensionPending(app_id),
+ app_id == currently_auto_launched_with_zero_delay_app_);
+ }
return true;
}
+bool KioskAppManager::GetAppByAccountId(const AccountId& account_id,
+ App* app) const {
+ for (const auto& app_data : apps_) {
+ if (app_data->account_id() == account_id) {
+ if (app) {
+ const std::string& app_id = app_data->app_id();
+ *app = App(*app_data, external_cache_->IsExtensionPending(app_id),
+ app_id == currently_auto_launched_with_zero_delay_app_);
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
bool KioskAppManager::GetDisableBailoutShortcut() const {
bool enable;
if (CrosSettings::Get()->GetBoolean(

Powered by Google App Engine
This is Rietveld 408576698