| Index: chrome/browser/chromeos/login/wallpaper_manager.cc
|
| diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| index 12394ad3273e9ca33c22d644d9c39ad6a2bb2dbe..44c376d3baa0a08e8e82bd323f47708b74a8b445 100644
|
| --- a/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| +++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| @@ -702,8 +702,8 @@ void WallpaperManager::SetUserWallpaperNow(const std::string& email) {
|
| void WallpaperManager::ScheduleSetUserWallpaper(const std::string& email,
|
| bool delayed) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - // Some unit tests come here without a UserManager.
|
| - if (!UserManager::IsInitialized())
|
| + // Some unit tests come here without a UserManager or without a pref system.
|
| + if (!UserManager::IsInitialized() || !g_browser_process->local_state())
|
| return;
|
| // There is no visible background in kiosk mode.
|
| if (UserManager::Get()->IsLoggedInAsKioskApp())
|
| @@ -1036,9 +1036,7 @@ bool WallpaperManager::GetUserWallpaperInfo(const std::string& email,
|
| WallpaperInfo* info){
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| - // Some unit tests come here with no browser local state attached.
|
| - if (UserManager::Get()->IsUserNonCryptohomeDataEphemeral(email) ||
|
| - !g_browser_process->local_state()) {
|
| + if (UserManager::Get()->IsUserNonCryptohomeDataEphemeral(email)) {
|
| // Default to the values cached in memory.
|
| *info = current_user_wallpaper_info_;
|
|
|
|
|