Chromium Code Reviews| 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)); |
| + } |
| } |