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

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

Issue 16634016: Support png wallpapers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: spelling Created 7 years, 6 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 9d5f39e51a55a4e1e4617fe6da0793a4d8716991..9a0cc85aac6e66aa0ec15d1a3edfcf7bdbac4892 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

Powered by Google App Engine
This is Rietveld 408576698