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

Unified Diff: content/browser/download/save_file.cc

Issue 2695153002: Refactor BaseFile class to support sparse files (Closed)
Patch Set: Created 3 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
Index: content/browser/download/save_file.cc
diff --git a/content/browser/download/save_file.cc b/content/browser/download/save_file.cc
index 96cd0bf9447e82bd3f2f6ff44e4c11978ee17978..e19aaa00dce551e46ec5265ab8977fa4495f75e1 100644
--- a/content/browser/download/save_file.cc
+++ b/content/browser/download/save_file.cc
@@ -28,12 +28,13 @@ SaveFile::~SaveFile() {
DownloadInterruptReason SaveFile::Initialize() {
return file_.Initialize(base::FilePath(), base::FilePath(), base::File(), 0,
- std::string(), std::unique_ptr<crypto::SecureHash>());
+ std::string(), std::unique_ptr<crypto::SecureHash>(),
+ BaseFile::EXCLUSIVE);
}
DownloadInterruptReason SaveFile::AppendDataToFile(const char* data,
size_t data_len) {
- return file_.AppendDataToFile(data, data_len);
+ return file_.WriteDataToFile(data, data_len);
}
DownloadInterruptReason SaveFile::Rename(const base::FilePath& full_path) {

Powered by Google App Engine
This is Rietveld 408576698