Index: chrome/browser/ui/startup/startup_browser_creator.cc |
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc |
index c5663e12484a50bbfeea08960ef0e2ddd6d953d1..703e1363f16f788aaa9a3912b7eb38a34c7a4a94 100644 |
--- a/chrome/browser/ui/startup/startup_browser_creator.cc |
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc |
@@ -74,8 +74,10 @@ |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/app_mode/app_launch_utils.h" |
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
+#include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" |
#include "chrome/browser/chromeos/login/user_manager.h" |
#include "chrome/browser/chromeos/profiles/profile_helper.h" |
+#include "chrome/browser/lifetime/application_lifetime.h" |
#include "chromeos/chromeos_switches.h" |
#endif |
@@ -616,6 +618,15 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( |
// Skip browser launch since app mode launches its app window. |
silent_launch = true; |
} |
+ |
+ // If we are a demo app session and we crashed, there is no safe recovery |
+ // possible. We should instead cleanly exit and go back to the OOBE screen, |
+ // where we will launch again after the timeout has expired. |
+ if (chromeos::DemoAppLauncher::IsDemoAppSession( |
+ command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { |
+ chrome::AttemptUserExit(); |
bartfab (slow)
2014/02/13 19:51:53
Have you tested this? In my experience, Chrome is
rkc
2014/02/13 23:22:01
Yes, multiple times. Works fine.
If you also look
|
+ return false; |
+ } |
#endif |
#if defined(TOOLKIT_VIEWS) && defined(USE_X11) |