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

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

Issue 2752603002: Propagate server response error and interrupt the download. (Closed)
Patch Set: 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
Index: content/browser/download/parallel_download_job.h
diff --git a/content/browser/download/parallel_download_job.h b/content/browser/download/parallel_download_job.h
index 8d02a7984fb2992982c724f9be56fb6586b11d17..2d1f550b5b5a5a74e8c8bd015a006c5e31907c0d 100644
--- a/content/browser/download/parallel_download_job.h
+++ b/content/browser/download/parallel_download_job.h
@@ -18,7 +18,8 @@ namespace content {
// DownloadJob that can create concurrent range requests to fetch different
// parts of the file.
// The original request is hold in base class DownloadUrlJob.
-class CONTENT_EXPORT ParallelDownloadJob : public DownloadJobImpl {
+class CONTENT_EXPORT ParallelDownloadJob : public DownloadJobImpl,
+ public DownloadWorker::Delegate {
public:
ParallelDownloadJob(
DownloadItemImpl* download_item,
@@ -37,6 +38,10 @@ class CONTENT_EXPORT ParallelDownloadJob : public DownloadJobImpl {
typedef std::vector<std::unique_ptr<DownloadWorker>> WorkerList;
+ // DownloadWorker::Delegate implementation.
+ void OnServerResponseError(DownloadWorker* worker,
+ DownloadInterruptReason reason) override;
+
// Build multiple http requests for a new download,
// the rest of the bytes starting from |bytes_received| will be equally
// distributed to each connection, including the original connection.

Powered by Google App Engine
This is Rietveld 408576698