Chromium Code Reviews| 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 06837af7f81472e8c14528b795c9c96883445016..702ec67fbb11489cea072cc52540d63034fe98ce 100644 |
| --- a/chrome/browser/chromeos/login/wallpaper_manager.cc |
| +++ b/chrome/browser/chromeos/login/wallpaper_manager.cc |
| @@ -399,17 +399,12 @@ void WallpaperManager::SetUserWallpaper(const std::string& email) { |
| index = ash::GetNextWallpaperIndex(index); |
| SaveUserWallpaperProperties(email, User::DAILY, index); |
| } else if (type == User::CUSTOMIZED) { |
| - gfx::ImageSkia custom_wallpaper; |
| - if (GetCustomWallpaperFromCache(email, &custom_wallpaper)) { |
|
Ivan Korotkov
2012/08/16 15:45:01
Why is GetCustomWallpaperFromCache not needed anym
bshe
2012/08/16 22:32:49
If we cache (load from file and decode it) the cus
|
| - // In customized mode, we use index pref to save the user selected |
| - // wallpaper layout. See function SaveWallpaperToLocalState(). |
| - ash::WallpaperLayout layout = static_cast<ash::WallpaperLayout>(index); |
| - ash::Shell::GetInstance()->desktop_background_controller()-> |
| - SetCustomWallpaper(custom_wallpaper, layout); |
| + if (!UserManager::Get()->IsUserLoggedIn()) { |
| + index = ash::GetDefaultWallpaperIndex(); |
|
Ivan Korotkov
2012/08/16 15:45:01
Please comment on the purpose of this.
bshe
2012/08/16 22:32:49
Done
On 2012/08/16 15:45:01, Ivan Korotkov wrote:
|
| } else { |
| FetchCustomWallpaper(email); |
| + return; |
| } |
| - return; |
| } |
| ash::Shell::GetInstance()->desktop_background_controller()-> |
| SetDefaultWallpaper(index, false); |
| @@ -490,12 +485,8 @@ void WallpaperManager::CacheUserWallpaper(const std::string& email) { |
| base::Time date; |
| GetUserWallpaperProperties(email, &type, &index, &date); |
| if (type == User::CUSTOMIZED) { |
| - std::string wallpaper_path = GetWallpaperPathForUser(email, false).value(); |
| - |
| - // Uses WeakPtr here to make the request cancelable. |
| - wallpaper_loader_->Start(wallpaper_path, 0, |
| - base::Bind(&WallpaperManager::CacheWallpaper, |
| - weak_factory_.GetWeakPtr(), email)); |
| + ash::Shell::GetInstance()->desktop_background_controller()-> |
| + CacheDefaultWallpaper(ash::GetDefaultWallpaperIndex()); |
| } else { |
| ash::Shell::GetInstance()->desktop_background_controller()-> |
| CacheDefaultWallpaper(index); |