| Index: content/browser/download/download_file.h
|
| diff --git a/content/browser/download/download_file.h b/content/browser/download/download_file.h
|
| index 7e57d211d020abd60dc6835ffcfd028a4390169c..3ca9717b39557d3d094c2979b7f96e5f3aa1bb70 100644
|
| --- a/content/browser/download/download_file.h
|
| +++ b/content/browser/download/download_file.h
|
| @@ -29,18 +29,13 @@ class CONTENT_EXPORT DownloadFile {
|
| typedef base::Callback<void(DownloadInterruptReason reason)>
|
| InitializeCallback;
|
|
|
| - // Callback used with Rename(). On a successful rename |reason| will be
|
| + // Callback used with Rename*(). On a successful rename |reason| will be
|
| // 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(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
|
| @@ -48,18 +43,20 @@ class CONTENT_EXPORT DownloadFile {
|
| // called on the UI thread as per the comment above.
|
| virtual void Initialize(const InitializeCallback& callback) = 0;
|
|
|
| - // Rename the download file to |full_path|. If that file exists and
|
| - // |overwrite_existing_file| is false, |full_path| will be uniquified by
|
| - // suffixing " (<number>)" to the file name before the extension.
|
| - // Upon completion, |callback| will be called on the UI thread
|
| - // as per the comment above.
|
| - virtual void Rename(const FilePath& full_path,
|
| - bool overwrite_existing_file,
|
| - const RenameCompletionCallback& callback) = 0;
|
| + // Rename the download file to |full_path|. If that file exists
|
| + // |full_path| will be uniquified by suffixing " (<number>)" to the
|
| + // file name before the extension.
|
| + virtual void RenameAndUniquify(const FilePath& full_path,
|
| + const RenameCompletionCallback& callback) = 0;
|
| +
|
| + // Rename the download file to |full_path| and annotate it with
|
| + // "Mark of the Web" information about its source. No uniquification
|
| + // will be performed.
|
| + virtual void RenameAndAnnotate(const FilePath& full_path,
|
| + const RenameCompletionCallback& callback) = 0;
|
|
|
| // Detach the file so it is not deleted on destruction.
|
| - // |callback| will be called on the UI thread after detach.
|
| - virtual void Detach(const DetachCompletionCallback& callback) = 0;
|
| + virtual void Detach() = 0;
|
|
|
| // Abort the download and automatically close the file.
|
| virtual void Cancel() = 0;
|
|
|