| 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 25ef809b7850c8e16d8192f903c57ffec00d5fa9..5c8ea7afa0c33fccd6d141ad305085327e5d82e9 100644
|
| --- a/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| +++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| @@ -1061,11 +1061,13 @@ void WallpaperManager::SaveCustomWallpaper(const std::string& email,
|
| GetCustomWallpaperPath(kLargeWallpaperSubDir, email, file_name);
|
|
|
| std::vector<unsigned char> image_data = wallpaper.raw_image();
|
| - // Saves the original file in case that resized wallpaper is not generated
|
| - // (i.e. chrome shutdown before resized wallpaper is saved).
|
| - SaveWallpaperInternal(original_path,
|
| - reinterpret_cast<char*>(&*image_data.begin()),
|
| - image_data.size());
|
| + // Re-encode orginal file to jpeg format and saves the result in case that
|
| + // resized wallpaper is not generated (i.e. chrome shutdown before resized
|
| + // wallpaper is saved).
|
| + ResizeAndSaveWallpaper(wallpaper, original_path,
|
| + ash::WALLPAPER_LAYOUT_STRETCH,
|
| + wallpaper.image().width(),
|
| + wallpaper.image().height());
|
| DeleteAllExcept(original_path);
|
|
|
| ResizeAndSaveWallpaper(wallpaper, small_wallpaper_path, layout,
|
| @@ -1114,4 +1116,4 @@ void WallpaperManager::TimezoneChanged(const icu::TimeZone& timezone) {
|
| RestartTimer();
|
| }
|
|
|
| -} // chromeos
|
| +} // namespace chromeos
|
|
|