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

Unified Diff: content/browser/download/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/download_job.h ('k') | content/browser/download/download_worker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_job.cc
diff --git a/content/browser/download/download_job.cc b/content/browser/download/download_job.cc
index 400a3fde9aa58c8f14f2e872d4fce1dc100c35bd..1ed38b82fa8d83d02b5910ad2399e4b8780b35e6 100644
--- a/content/browser/download/download_job.cc
+++ b/content/browser/download/download_job.cc
@@ -28,6 +28,11 @@ void DownloadJob::StartDownload() const {
download_item_->StartDownload();
}
+void DownloadJob::Interrupt(DownloadInterruptReason reason) {
+ download_item_->InterruptAndDiscardPartialState(reason);
+ download_item_->UpdateObservers();
+}
+
void DownloadJob::AddByteStream(std::unique_ptr<ByteStreamReader> stream_reader,
int64_t offset,
int64_t length) {
« no previous file with comments | « content/browser/download/download_job.h ('k') | content/browser/download/download_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698