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

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

Issue 11150027: Handle the case where IAttachmentExecute::Save() deletes a downloaded file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + Address comments + Update strings Created 8 years, 2 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_impl.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 1bbde02bd6d50a9b366414ba34f2424c945d1c83..7e57d211d020abd60dc6835ffcfd028a4390169c 100644
--- a/content/browser/download/download_file.h
+++ b/content/browser/download/download_file.h
@@ -36,6 +36,11 @@ class CONTENT_EXPORT DownloadFile {
typedef base::Callback<void(DownloadInterruptReason reason,
const FilePath& path)> RenameCompletionCallback;
+ // Callback used with Detach(). On success, |reason| will be
+ // DOWNLOAD_INTERRUPT_REASON_NONE.
+ typedef base::Callback<void(DownloadInterruptReason reason)>
+ DetachCompletionCallback;
+
virtual ~DownloadFile() {}
// Returns DOWNLOAD_INTERRUPT_REASON_NONE on success, or a network
@@ -54,14 +59,11 @@ class CONTENT_EXPORT DownloadFile {
// Detach the file so it is not deleted on destruction.
// |callback| will be called on the UI thread after detach.
- virtual void Detach(base::Closure callback) = 0;
+ virtual void Detach(const DetachCompletionCallback& callback) = 0;
// Abort the download and automatically close the file.
virtual void Cancel() = 0;
- // Informs the OS that this file came from the internet.
- virtual void AnnotateWithSourceInformation() = 0;
-
virtual FilePath FullPath() const = 0;
virtual bool InProgress() const = 0;
virtual int64 BytesSoFar() const = 0;
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | content/browser/download/download_file_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698