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

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

Issue 2695153002: Refactor BaseFile class to support sparse files (Closed)
Patch Set: using a single fd 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/download_file_impl.cc
diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc
index 7e8a3f0c5099ca3e95a906585b21988a766217e8..b5817e3ec252d5fb0d884b68271d3bdeebae148d 100644
--- a/content/browser/download/download_file_impl.cc
+++ b/content/browser/download/download_file_impl.cc
@@ -79,7 +79,8 @@ void DownloadFileImpl::Initialize(const InitializeCallback& callback) {
std::move(save_info_->file),
save_info_->offset,
save_info_->hash_of_partial_file,
- std::move(save_info_->hash_state));
+ std::move(save_info_->hash_state),
+ BaseFile::EXCLUSIVE);
if (result != DOWNLOAD_INTERRUPT_REASON_NONE) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE, base::Bind(callback, result));

Powered by Google App Engine
This is Rietveld 408576698