Index: content/browser/download/download_file.h |
diff --git a/content/browser/download/download_file.h b/content/browser/download/download_file.h |
index c0b4d5aaf7280e6fe40cc729e3e5b841e6b38cec..3820d900a21f889bc52db1eae014e4c0eed3d935 100644 |
--- a/content/browser/download/download_file.h |
+++ b/content/browser/download/download_file.h |
@@ -9,6 +9,7 @@ |
#include <string> |
#include "base/basictypes.h" |
+#include "base/callback_forward.h" |
#include "base/file_path.h" |
#include "content/common/content_export.h" |
#include "content/public/browser/download_id.h" |
@@ -24,6 +25,11 @@ class DownloadManager; |
// cancelled, the DownloadFile is destroyed. |
class CONTENT_EXPORT DownloadFile { |
public: |
+ // Callback used with Rename(). |reason| will be |
+ // DOWNLOAD_INTERRUPT_REASON_NONE on a successful rename. |
+ typedef base::Callback<void(content::DownloadInterruptReason reason, |
+ const FilePath&)> RenameCompletionCallback; |
+ |
virtual ~DownloadFile() {} |
// If calculate_hash is true, sha256 hash will be calculated. |
@@ -33,7 +39,9 @@ class CONTENT_EXPORT DownloadFile { |
// Rename the download file. |
// Returns net::OK on success, or a network error code on failure. |
asanka
2012/07/05 18:47:21
Mention new arguments. In particular also mention
Randy Smith (Not in Mondays)
2012/07/09 20:35:51
Good point--thanks for catching this. Done.
|
- virtual DownloadInterruptReason Rename(const FilePath& full_path) = 0; |
+ virtual void Rename(const FilePath& full_path, |
+ bool overwrite_existing_file, |
+ const RenameCompletionCallback& callback) = 0; |
// Detach the file so it is not deleted on destruction. |
virtual void Detach() = 0; |