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 1758d2916bc74fd596ebadf63a846f25da8c9d4e..c064a508a247c596dc24b25f480bb515807ccaf5 100644 |
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc |
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc |
@@ -702,6 +702,9 @@ 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()) |
+ return; |
// There is no visible background in kiosk mode. |
if (UserManager::Get()->IsLoggedInAsKioskApp()) |
return; |
@@ -1193,10 +1196,12 @@ void WallpaperManager::OnWallpaperDecoded( |
return; |
} |
- // Only cache user wallpaper at login screen. |
- if (!UserManager::Get()->IsUserLoggedIn()) { |
+ // Only cache the user wallpaper at login screen and for multi profile users. |
+ if (!UserManager::Get()->IsUserLoggedIn() || |
+ (UserManager::Get()->GetLoggedInUsers().size() > 1)) { |
wallpaper_cache_.insert(std::make_pair(email, wallpaper.image())); |
bshe
2014/01/27 16:00:15
If a user changes wallpaper during multi profile s
Mr4D (OOO till 08-26)
2014/01/27 18:44:18
Done.
|
} |
+ |
if (update_wallpaper) { |
ash::Shell::GetInstance()->desktop_background_controller()-> |
SetCustomWallpaper(wallpaper.image(), layout); |