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

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

Issue 2752603002: Propagate server response error and interrupt the download. (Closed)
Patch Set: Merge recent changes in the tree. Created 3 years, 9 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 | « content/browser/download/parallel_download_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/parallel_download_job.cc
diff --git a/content/browser/download/parallel_download_job.cc b/content/browser/download/parallel_download_job.cc
index 0a2d6c95d98b7d9e8f82c7e6709e0ed25d6b4c4e..1a8b93059b30f1c12f7d4801becd6a38bda5c651 100644
--- a/content/browser/download/parallel_download_job.cc
+++ b/content/browser/download/parallel_download_job.cc
@@ -89,6 +89,15 @@ void ParallelDownloadJob::OnByteStreamReady(
worker->length());
}
+void ParallelDownloadJob::OnServerResponseError(
+ DownloadWorker* worker,
+ DownloadInterruptReason reason) {
+ // TODO(xingliu): Consider to let the original request to cover the full
+ // content if the sub-requests get invalid response. Consider retry on certain
+ // error.
+ DownloadJob::Interrupt(reason);
+}
+
void ParallelDownloadJob::BuildParallelRequests() {
DCHECK(!requests_sent_);
// TODO(qinmin): The size of |slices_to_download| should be no larger than
« no previous file with comments | « content/browser/download/parallel_download_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698