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

Unified Diff: chrome/browser/download/base_file.cc

Issue 6480079: DownloadFile no longer keeps track of whether or not the final rename has occurred. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits. Created 9 years, 10 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 | « chrome/browser/download/base_file.h ('k') | chrome/browser/download/base_file_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/base_file.cc
diff --git a/chrome/browser/download/base_file.cc b/chrome/browser/download/base_file.cc
index 79f38e9c7c2d1609634cc217ba7f80a09a13cc35..a17d2bbef76e8e098c142eb1bb3feaa0de883455 100644
--- a/chrome/browser/download/base_file.cc
+++ b/chrome/browser/download/base_file.cc
@@ -25,7 +25,6 @@ BaseFile::BaseFile(const FilePath& full_path,
int64 received_bytes,
const linked_ptr<net::FileStream>& file_stream)
: full_path_(full_path),
- path_renamed_(false),
source_url_(source_url),
referrer_url_(referrer_url),
file_stream_(file_stream),
@@ -79,7 +78,7 @@ bool BaseFile::AppendDataToFile(const char* data, size_t data_len) {
return true;
}
-bool BaseFile::Rename(const FilePath& new_path, bool is_final_rename) {
+bool BaseFile::Rename(const FilePath& new_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Save the information whether the download is in progress because
@@ -89,8 +88,6 @@ bool BaseFile::Rename(const FilePath& new_path, bool is_final_rename) {
// If the new path is same as the old one, there is no need to perform the
// following renaming logic.
if (new_path == full_path_) {
- path_renamed_ = is_final_rename;
-
// Don't close the file if we're not done (finished or canceled).
if (!saved_in_progress)
Close();
@@ -131,7 +128,6 @@ bool BaseFile::Rename(const FilePath& new_path, bool is_final_rename) {
#endif
full_path_ = new_path;
- path_renamed_ = is_final_rename;
// We don't need to re-open the file if we're done (finished or canceled).
if (!saved_in_progress)
« no previous file with comments | « chrome/browser/download/base_file.h ('k') | chrome/browser/download/base_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698