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..97ccbe01df5471aaabbded809ec51e6935b0949b 100644 |
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc |
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc |
@@ -399,17 +399,15 @@ 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)) { |
- // 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); |
+ // For security reason, use default wallpaper instead of custom wallpaper |
+ // at login screen. The security issue is tracked in issue 143198. Once it |
+ // fixed, we should then only use custom wallpaper. |
+ if (!UserManager::Get()->IsUserLoggedIn()) { |
+ index = ash::GetDefaultWallpaperIndex(); |
} else { |
FetchCustomWallpaper(email); |
+ return; |
} |
- return; |
} |
ash::Shell::GetInstance()->desktop_background_controller()-> |
SetDefaultWallpaper(index, false); |
@@ -490,12 +488,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); |