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

Unified Diff: chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc

Issue 13495003: Add LoginState class to src/chromeos/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Elim LOGGED_IN_LOCKED 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
Index: chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
diff --git a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
index b272a0821c67eb4db86f6dfd04dee4f1e523afa3..5f9e1d362e9155bc645ea36bf3ea5ac2cf69eb05 100644
--- a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
+++ b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
@@ -10,7 +10,6 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h"
-#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/login/wallpaper_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -20,6 +19,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chromeos/chromeos_switches.h"
+#include "chromeos/login/login_state.h"
#include "content/public/browser/notification_service.h"
namespace chromeos {
@@ -27,7 +27,7 @@ namespace chromeos {
namespace {
bool IsNormalWallpaperChange() {
- if (chromeos::UserManager::Get()->IsUserLoggedIn() ||
+ if (chromeos::LoginState::Get()->IsUserLoggedIn() ||
!CommandLine::ForCurrentProcess()->HasSwitch(switches::kFirstBoot) ||
WizardController::IsZeroDelayEnabled() ||
!CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager)) {
@@ -84,7 +84,13 @@ class UserWallpaperDelegate : public ash::UserWallpaperDelegate {
}
virtual bool CanOpenSetWallpaperPage() OVERRIDE {
- return !chromeos::UserManager::Get()->IsLoggedInAsGuest();
+ LoginState::LoggedInUserType user_type =
+ LoginState::Get()->GetLoggedInUserType();
+ if (user_type == LoginState::LOGGED_IN_USER_REGULAR ||
+ user_type == LoginState::LOGGED_IN_USER_OWNER ||
+ user_type == LoginState::LOGGED_IN_USER_LOCALLY_MANAGED)
+ return true;
Nikita (slow) 2013/04/10 08:09:22 nit: add {} as condition takes more than one line.
stevenjb 2013/04/10 16:32:17 Heh. I've been going back and forth with different
+ return false;
}
virtual void OnWallpaperAnimationFinished() OVERRIDE {

Powered by Google App Engine
This is Rietveld 408576698