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

Unified Diff: chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc

Issue 11361187: Merge 166784 - Check for login screen availibility before showing spinner. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc
===================================================================
--- chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc (revision 166934)
+++ chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc (working copy)
@@ -193,24 +193,29 @@
ash::Shell::GetInstance()->user_activity_detector()->RemoveObserver(this);
// Find the retail mode login page.
- CHECK(WebUILoginDisplayHost::default_host());
- WebUILoginDisplayHost* webui_host =
- static_cast<WebUILoginDisplayHost*>(
- WebUILoginDisplayHost::default_host());
- OobeUI* oobe_ui = webui_host->GetOobeUI();
+ if (WebUILoginDisplayHost::default_host()) {
+ WebUILoginDisplayHost* webui_host =
+ static_cast<WebUILoginDisplayHost*>(
+ WebUILoginDisplayHost::default_host());
+ OobeUI* oobe_ui = webui_host->GetOobeUI();
- // Show the login spinner.
- CHECK(oobe_ui);
- oobe_ui->ShowRetailModeLoginSpinner();
+ // Show the login spinner.
+ if (oobe_ui)
+ oobe_ui->ShowRetailModeLoginSpinner();
- // Close the screensaver, our login spinner is already showing.
- ash::CloseScreensaver();
+ // Close the screensaver, our login spinner is already showing.
+ ash::CloseScreensaver();
- // Log us in.
- ExistingUserController* controller =
- ExistingUserController::current_controller();
- CHECK(controller);
- controller->LoginAsDemoUser();
+ // Log us in.
+ ExistingUserController* controller =
+ ExistingUserController::current_controller();
+ if (controller && !chromeos::UserManager::Get()->IsUserLoggedIn())
+ controller->LoginAsDemoUser();
+ } else {
+ // No default host for the WebUiLoginDisplay means that we're already in the
+ // process of logging in - shut down screensaver and do nothing else.
+ ash::CloseScreensaver();
+ }
ShutdownKioskModeScreensaver();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698