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

Unified Diff: chrome/browser/chromeos/login/app_launch_controller.cc

Issue 2601803003: Introduce kiosk.autolaunched feature session type (Closed)
Patch Set: . Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/session/user_session_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/app_launch_controller.cc
diff --git a/chrome/browser/chromeos/login/app_launch_controller.cc b/chrome/browser/chromeos/login/app_launch_controller.cc
index 33d8749ae362db79c108363db73445d8d068f92d..9ba7cd19eaa4844d6c61e7b00f24af25b9073dc6 100644
--- a/chrome/browser/chromeos/login/app_launch_controller.cc
+++ b/chrome/browser/chromeos/login/app_launch_controller.cc
@@ -36,6 +36,7 @@
#include "content/public/browser/notification_service.h"
#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/app_window_registry.h"
+#include "extensions/common/features/feature_session_type.h"
#include "net/base/network_change_notifier.h"
namespace chromeos {
@@ -171,18 +172,26 @@ void AppLaunchController::StartAppLaunch(bool is_auto_launch) {
CHECK(KioskAppManager::Get());
CHECK(KioskAppManager::Get()->GetApp(app_id_, &app));
+ int auto_launch_delay = -1;
if (is_auto_launch) {
- int delay;
if (!CrosSettings::Get()->GetInteger(
- kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) {
- delay = 0;
+ kAccountsPrefDeviceLocalAccountAutoLoginDelay,
+ &auto_launch_delay)) {
+ auto_launch_delay = 0;
}
- DCHECK_EQ(0, delay) << "Kiosks do not support non-zero auto-login delays";
+ DCHECK_EQ(0, auto_launch_delay)
+ << "Kiosks do not support non-zero auto-login delays";
// If we are launching a kiosk app with zero delay, mark it appropriately.
- if (delay == 0)
+ if (auto_launch_delay == 0)
KioskAppManager::Get()->SetAppWasAutoLaunchedWithZeroDelay(app_id_);
}
+
+ extensions::SetCurrentFeatureSessionType(
+ is_auto_launch && auto_launch_delay == 0
+ ? extensions::FeatureSessionType::AUTOLAUNCHED_KIOSK
+ : extensions::FeatureSessionType::KIOSK);
+
kiosk_profile_loader_.reset(
new KioskProfileLoader(app.account_id, false, this));
kiosk_profile_loader_->Start();
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/session/user_session_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698