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

Unified Diff: chrome/browser/image_decoder.cc

Issue 10892023: Force avatar and wallpaper decoding to use robust JPEG. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reordered. Created 8 years, 4 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
« no previous file with comments | « chrome/browser/image_decoder.h ('k') | chrome/browser/profiles/profile_downloader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/image_decoder.cc
diff --git a/chrome/browser/image_decoder.cc b/chrome/browser/image_decoder.cc
index a345c773630f4c7d96a99b62ebccaf24ceca469a..1f456eeaf3f017e0256577a1be0f5424cca0793e 100644
--- a/chrome/browser/image_decoder.cc
+++ b/chrome/browser/image_decoder.cc
@@ -14,9 +14,11 @@ using content::BrowserThread;
using content::UtilityProcessHost;
ImageDecoder::ImageDecoder(Delegate* delegate,
- const std::string& image_data)
+ const std::string& image_data,
+ ImageCodec image_codec)
: delegate_(delegate),
image_data_(image_data.begin(), image_data.end()),
+ image_codec_(image_codec),
target_thread_id_(BrowserThread::UI) {
}
@@ -62,5 +64,10 @@ void ImageDecoder::DecodeImageInSandbox(
UtilityProcessHost* utility_process_host = UtilityProcessHost::Create(
this, target_thread_id_);
utility_process_host->EnableZygote();
- utility_process_host->Send(new ChromeUtilityMsg_DecodeImage(image_data));
+ if (image_codec_ == ROBUST_JPEG_CODEC) {
+ utility_process_host->Send(
+ new ChromeUtilityMsg_RobustJPEGDecodeImage(image_data));
+ } else {
+ utility_process_host->Send(new ChromeUtilityMsg_DecodeImage(image_data));
+ }
}
« no previous file with comments | « chrome/browser/image_decoder.h ('k') | chrome/browser/profiles/profile_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698