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

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

Issue 1544603003: [Downloads] Do not store error responses during resumption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unify-downloader-core
Patch Set: Created 4 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
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 cef57731792e96e8832ee0c0962b58a5d0f75b8b..a60ecce8e7f71586c6ebe2c6665660517fc044de 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -373,6 +373,7 @@ void DownloadItemImpl::Resume() {
case INTERRUPTED_INTERNAL:
auto_resume_count_ = 0; // User input resets the counter.
ResumeInterruptedDownload();
+ UpdateObservers();
svaldez 2016/01/13 17:29:18 Does this need to go at the bottom of "AutoResumeI
asanka 2016/01/28 02:24:17 Nope. AutoResumeIfValid() may or may not resume th
return;
case MAX_DOWNLOAD_INTERNAL_STATE:
@@ -893,6 +894,7 @@ DownloadItemImpl::ResumeMode DownloadItemImpl::GetResumeMode() const {
case DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN:
case DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST:
case DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED:
+ case DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE:
case DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN:
case DOWNLOAD_INTERRUPT_REASON_CRASH:
if (force_restart)
@@ -1418,6 +1420,7 @@ void DownloadItemImpl::OnResumeRequestStarted(
DCHECK_EQ(static_cast<DownloadItem*>(this), item);
return;
}
+
// Otherwise, the request failed without passing through
// DownloadResourceHandler::OnResponseStarted.
DCHECK_NE(DOWNLOAD_INTERRUPT_REASON_NONE, interrupt_reason);

Powered by Google App Engine
This is Rietveld 408576698