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

Unified Diff: chrome/browser/ui/ash/ash_init.cc

Issue 13495003: Add LoginState class to src/chromeos/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore LOGGED_IN_KIOSK_APP Created 7 years, 9 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/ui/ash/ash_init.cc
diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc
index 72e1f14e110c9af0ff1931cc945eb61112d7f695..ca556255d955c4a5d222a485527e960d8e672eed 100644
--- a/chrome/browser/ui/ash/ash_init.cc
+++ b/chrome/browser/ui/ash/ash_init.cc
@@ -27,11 +27,11 @@
#if defined(OS_CHROMEOS)
#include "base/chromeos/chromeos_version.h"
-#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/ui/ash/brightness_controller_chromeos.h"
#include "chrome/browser/ui/ash/ime_controller_chromeos.h"
#include "chrome/browser/ui/ash/volume_controller_chromeos.h"
#include "chromeos/chromeos_switches.h"
+#include "chromeos/login/login_state.h"
#include "ui/base/x/x11_util.h"
#endif
@@ -45,17 +45,6 @@ bool ShouldOpenAshOnStartup() {
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh);
}
-#if defined(OS_CHROMEOS)
-// Returns true if the cursor should be initially hidden.
-bool ShouldInitiallyHideCursor() {
- if (base::chromeos::IsRunningOnChromeOS())
- return !chromeos::UserManager::Get()->IsUserLoggedIn();
- else
- return CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kLoginManager);
-}
-#endif
-
void OpenAsh() {
#if defined(OS_CHROMEOS)
if (base::chromeos::IsRunningOnChromeOS()) {
@@ -66,7 +55,7 @@ void OpenAsh() {
}
// Hide the mouse cursor completely at boot.
- if (ShouldInitiallyHideCursor())
+ if (!chromeos::LoginState::Get()->IsUserLoggedIn())
ash::Shell::set_initially_hide_cursor(true);
#endif

Powered by Google App Engine
This is Rietveld 408576698