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

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

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.cc ('k') | content/browser/download/download_worker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_worker.h
diff --git a/content/browser/download/download_worker.h b/content/browser/download/download_worker.h
index 111927471865d74b2d032f7e1217042bafedf6aa..62573e42496d6de9c88490fa1ac10a4d445900ab 100644
--- a/content/browser/download/download_worker.h
+++ b/content/browser/download/download_worker.h
@@ -31,6 +31,9 @@ class DownloadWorker : public UrlDownloader::Delegate {
virtual void OnByteStreamReady(
DownloadWorker* worker,
std::unique_ptr<ByteStreamReader> stream_reader) = 0;
+ // Called when there is an error caused by the server response.
+ virtual void OnServerResponseError(DownloadWorker* worker,
+ DownloadInterruptReason reason) = 0;
};
DownloadWorker(DownloadWorker::Delegate* delegate,
@@ -61,7 +64,7 @@ class DownloadWorker : public UrlDownloader::Delegate {
std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>
downloader);
- DownloadWorker::Delegate* delegate_;
+ DownloadWorker::Delegate* const delegate_;
// The starting position of the content for this worker to download.
int64_t offset_;
« no previous file with comments | « content/browser/download/download_job.cc ('k') | content/browser/download/download_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698