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

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

Issue 13495003: Add LoginState class to src/chromeos/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/webui/screenshot_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
index 34407033dafeb4fb6d7ad186d3af739f604f3b12..e2be57040955ef2d6f9d01fdfbcd7bda92a2446d 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
@@ -8,7 +8,6 @@
#include "ash/system/chromeos/network/network_observer.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/wm/window_util.h"
-#include "base/chromeos/chromeos_version.h"
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
#include "base/utf_string_conversions.h"
@@ -44,6 +43,7 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power_manager_client.h"
#include "chromeos/dbus/session_manager_client.h"
+#include "chromeos/login/login_state.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@@ -51,16 +51,7 @@
#include "ui/base/l10n/l10n_util.h"
bool ChromeShellDelegate::IsUserLoggedIn() const {
- // When running a Chrome OS build outside of a device (i.e. on a developer's
- // workstation) and not running as login-manager, pretend like we're always
- // logged in.
- if (!base::chromeos::IsRunningOnChromeOS() &&
- !CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kLoginManager)) {
- return true;
- }
-
- return chromeos::UserManager::Get()->IsUserLoggedIn();
+ return chromeos::LoginState::Get()->IsUserLoggedIn();
}
bool ChromeShellDelegate::IsSessionStarted() const {
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/webui/screenshot_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698