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

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

Issue 10950015: Shift "commit point" for when a download will no longer accept cancels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR. Created 8 years, 3 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_browsertest.cc ('k') | content/browser/download/download_file_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file.h
diff --git a/content/browser/download/download_file.h b/content/browser/download/download_file.h
index e707a26ca10607149db7f8e14d587451e6d20cb8..22d646e96ba64d0a3bcde5a7977c13d16a1d2622 100644
--- a/content/browser/download/download_file.h
+++ b/content/browser/download/download_file.h
@@ -28,15 +28,15 @@ class CONTENT_EXPORT DownloadFile {
// DOWNLOAD_INTERRUPT_REASON_NONE and |path| the path the rename
// was done to. On a failed rename, |reason| will contain the
// error.
- typedef base::Callback<void(content::DownloadInterruptReason reason,
+ typedef base::Callback<void(DownloadInterruptReason reason,
const FilePath& path)> RenameCompletionCallback;
virtual ~DownloadFile() {}
- // If calculate_hash is true, sha256 hash will be calculated.
// Returns DOWNLOAD_INTERRUPT_REASON_NONE on success, or a network
- // error code on failure.
- virtual DownloadInterruptReason Initialize() = 0;
+ // error code on failure. Upon completion, |callback| will be
+ // called on the UI thread as per the comment above.
+ virtual content::DownloadInterruptReason Initialize() = 0;
// Rename the download file to |full_path|. If that file exists and
// |overwrite_existing_file| is false, |full_path| will be uniquified by
@@ -48,7 +48,8 @@ class CONTENT_EXPORT DownloadFile {
const RenameCompletionCallback& callback) = 0;
// Detach the file so it is not deleted on destruction.
- virtual void Detach() = 0;
+ // |callback| will be called on the UI thread after detach.
+ virtual void Detach(base::Closure callback) = 0;
// Abort the download and automatically close the file.
virtual void Cancel() = 0;
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | content/browser/download/download_file_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698