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

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

Issue 2877008: Rename the download to its final name only after the download is finished (Closed)
Patch Set: rebase Created 10 years, 5 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 | « base/file_path.h ('k') | chrome/browser/download/download_file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_file.h
diff --git a/chrome/browser/download/download_file.h b/chrome/browser/download/download_file.h
index 97057a6d7cb769428af44cf7c59564acfe6d3b4d..6fd605efdc849aa5695e6dbd0acb068dbabfbe3f 100644
--- a/chrome/browser/download/download_file.h
+++ b/chrome/browser/download/download_file.h
@@ -26,7 +26,7 @@ struct DownloadCreateInfo;
class DownloadFile {
public:
explicit DownloadFile(const DownloadCreateInfo* info);
- ~DownloadFile();
+ virtual ~DownloadFile();
bool Initialize();
@@ -37,11 +37,17 @@ class DownloadFile {
void Cancel();
// Rename the download file. Returns 'true' if the rename was successful.
- bool Rename(const FilePath& full_path);
+ // path_renamed_ is set true only if |is_final_rename| is true.
+ // Marked virtual for testing.
+ virtual bool Rename(const FilePath& full_path, bool is_final_rename);
// Informs the OS that this file came from the internet.
void AnnotateWithSourceInformation();
+ // Deletes its .crdownload intermediate file.
+ // Marked virtual for testing.
+ virtual void DeleteCrDownload();
+
// Accessors.
int64 bytes_so_far() const { return bytes_so_far_; }
int id() const { return id_; }
« no previous file with comments | « base/file_path.h ('k') | chrome/browser/download/download_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698