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

Unified Diff: content/browser/download/download_item_impl.cc

Issue 2653833002: Fix an issue that download may missing MIME type if it failed ealier (Closed)
Patch Set: fix DCHECK Created 3 years, 11 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 | « no previous file | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_item_impl.cc
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index c696d1bffe412fcdddbce1df56fca3ef60c81f45..47ad0ee6944fc98bafb52c0621adf81b0e10e239 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -995,6 +995,9 @@ void DownloadItemImpl::UpdateValidatorsOnResumption(
etag_ = new_create_info.etag;
last_modified_time_ = new_create_info.last_modified;
content_disposition_ = new_create_info.content_disposition;
+ // It is possible that the previous download attempt failed right before the
+ // response is received. Need to reset the MIME type.
+ mime_type_ = new_create_info.mime_type;
// Don't update observers. This method is expected to be called just before a
// DownloadFile is created and Start() is called. The observers will be
« no previous file with comments | « no previous file | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698