| Index: chrome/browser/download/notification/download_item_notification.cc
|
| diff --git a/chrome/browser/download/notification/download_item_notification.cc b/chrome/browser/download/notification/download_item_notification.cc
|
| index e98e7d0ae4a095328ff0bca37e2a15f1455534a0..cc5f995e554d201ef2db69a8658e33d220a33ff9 100644
|
| --- a/chrome/browser/download/notification/download_item_notification.cc
|
| +++ b/chrome/browser/download/notification/download_item_notification.cc
|
| @@ -470,7 +470,22 @@
|
|
|
| image_decode_status_ = IN_PROGRESS;
|
|
|
| - if (model.HasSupportedImageMimeType()) {
|
| + bool maybe_image = false;
|
| + if (mime_util::IsSupportedImageMimeType(item_->GetMimeType())) {
|
| + maybe_image = true;
|
| + } else {
|
| + std::string mime;
|
| + base::FilePath::StringType extension_with_dot =
|
| + item_->GetTargetFilePath().FinalExtension();
|
| + if (!extension_with_dot.empty() &&
|
| + net::GetWellKnownMimeTypeFromExtension(extension_with_dot.substr(1),
|
| + &mime) &&
|
| + mime_util::IsSupportedImageMimeType(mime)) {
|
| + maybe_image = true;
|
| + }
|
| + }
|
| +
|
| + if (maybe_image) {
|
| base::FilePath file_path = item_->GetFullPath();
|
| base::PostTaskAndReplyWithResult(
|
| content::BrowserThread::GetBlockingPool(), FROM_HERE,
|
|
|