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 { |