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

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

Issue 2767593003: Handle early pause, cancel for parallel requests. (Closed)
Patch Set: Work on feedback. 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/download_worker.h
diff --git a/content/browser/download/download_worker.h b/content/browser/download/download_worker.h
index 62573e42496d6de9c88490fa1ac10a4d445900ab..55d83fe05f7c02e70d376cf2c1bb4da40e1e0ce6 100644
--- a/content/browser/download/download_worker.h
+++ b/content/browser/download/download_worker.h
@@ -12,6 +12,7 @@
#include "content/browser/byte_stream.h"
#include "content/browser/download/download_request_handle.h"
#include "content/browser/download/url_downloader.h"
+#include "content/common/content_export.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_url_parameters.h"
@@ -21,7 +22,7 @@ namespace content {
// file after handling response of the original non-range request.
// TODO(xingliu): we should consider to reuse this class for single connection
// download.
-class DownloadWorker : public UrlDownloader::Delegate {
+class CONTENT_EXPORT DownloadWorker : public UrlDownloader::Delegate {
public:
class Delegate {
public:
@@ -34,6 +35,8 @@ class DownloadWorker : public UrlDownloader::Delegate {
// Called when there is an error caused by the server response.
virtual void OnServerResponseError(DownloadWorker* worker,
DownloadInterruptReason reason) = 0;
+ virtual bool IsPaused() const = 0;
+ virtual bool IsCanceled() const = 0;
};
DownloadWorker(DownloadWorker::Delegate* delegate,

Powered by Google App Engine
This is Rietveld 408576698