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

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

Issue 2811293004: Fix an issue that we didn't clean url request properly. (Closed)
Patch Set: Work on feedback. Created 3 years, 8 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_file.h
diff --git a/content/browser/download/download_file.h b/content/browser/download/download_file.h
index 224121a034b77a1073b4ec7923a1e9f6e94b83d4..24dc4f3bfe1f7a9294b47de526682d3f91723b21 100644
--- a/content/browser/download/download_file.h
+++ b/content/browser/download/download_file.h
@@ -42,13 +42,18 @@ class CONTENT_EXPORT DownloadFile {
const base::FilePath& path)>
RenameCompletionCallback;
+ // Used to drop the request, when the byte stream reader should be closed on
+ // FILE thread.
+ typedef base::Callback<void(int64_t offset)> CancelRequestCallback;
+
virtual ~DownloadFile() {}
// Upon completion, |callback| will be called on the UI
qinmin 2017/04/17 21:39:59 s/callback/initialize_callback/
xingliu 2017/04/17 23:41:51 Done.
// thread as per the comment above, passing DOWNLOAD_INTERRUPT_REASON_NONE
// on success, or a network download interrupt reason on failure.
virtual void Initialize(
- const InitializeCallback& callback,
+ const InitializeCallback& initialize_callback,
+ const CancelRequestCallback& cancel_request_callback,
const DownloadItem::ReceivedSlices& received_slices) = 0;
// Add a byte stream reader to write into a slice of the file, used for
« no previous file with comments | « no previous file | content/browser/download/download_file_impl.h » ('j') | content/browser/download/parallel_download_job.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698