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

Unified Diff: chrome/browser/chromeos/login/wallpaper_manager.cc

Issue 130983007: Creating multi profile animations for switching users and teleporting of windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/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);

Powered by Google App Engine
This is Rietveld 408576698