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

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: 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
Index: chrome/browser/image_decoder.cc
diff --git a/chrome/browser/image_decoder.cc b/chrome/browser/image_decoder.cc
index a345c773630f4c7d96a99b62ebccaf24ceca469a..1a3444bec7690a7725570c9b7a1c7d1c8de5ff48 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,
+ bool require_standard_jpeg)
: delegate_(delegate),
image_data_(image_data.begin(), image_data.end()),
+ require_standard_jpeg_(require_standard_jpeg),
target_thread_id_(BrowserThread::UI) {
}
@@ -62,5 +64,11 @@ 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(require_standard_jpeg_) {
oshima 2012/08/29 00:02:48 space after if
+ utility_process_host->Send(
+ new ChromeUtilityMsg_DecodeImageWithStandardJPEG(image_data));
+ }
+ else {
oshima 2012/08/29 00:02:48 } else {
+ utility_process_host->Send(new ChromeUtilityMsg_DecodeImage(image_data));
+ }
}

Powered by Google App Engine
This is Rietveld 408576698