diff options
author | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-29 23:12:15 +0000 |
---|---|---|
committer | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-29 23:12:15 +0000 |
commit | 11f16d10114d6e266b590785fcf50bca63734d62 (patch) | |
tree | 8d68941d3e691746293b41dd890e7bcef0821d7d /chrome/browser/image_decoder.cc | |
parent | 6a01960c32c340d4333257bf9d0244f5199d8dd8 (diff) | |
download | chromium_src-11f16d10114d6e266b590785fcf50bca63734d62.zip chromium_src-11f16d10114d6e266b590785fcf50bca63734d62.tar.gz chromium_src-11f16d10114d6e266b590785fcf50bca63734d62.tar.bz2 |
Force avatar and wallpaper decoding to use robust JPEG.
The next step in an upcoming CL will bind this separate path to a different JPEG library (at a minimum on CrOS).
BUG=144296
Review URL: https://chromiumcodereview.appspot.com/10892023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/image_decoder.cc')
-rw-r--r-- | chrome/browser/image_decoder.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/image_decoder.cc b/chrome/browser/image_decoder.cc index a345c77..1f456ee 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)); + } } |