| 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..95298b5de7e62016caa4c12496565c48e618baef 100644
|
| --- a/content/browser/download/download_file_impl.cc
|
| +++ b/content/browser/download/download_file_impl.cc
|
| @@ -74,12 +74,10 @@ void DownloadFileImpl::Initialize(const InitializeCallback& callback) {
|
|
|
| update_timer_.reset(new base::RepeatingTimer());
|
| DownloadInterruptReason result =
|
| - file_.Initialize(save_info_->file_path,
|
| - default_download_directory_,
|
| - std::move(save_info_->file),
|
| - save_info_->offset,
|
| + file_.Initialize(save_info_->file_path, default_download_directory_,
|
| + 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));
|
| @@ -112,7 +110,7 @@ DownloadInterruptReason DownloadFileImpl::AppendDataToFile(
|
| this, &DownloadFileImpl::SendUpdate);
|
| }
|
| rate_estimator_.Increment(data_len);
|
| - return file_.AppendDataToFile(data, data_len);
|
| + return file_.WriteDataToFile(data, data_len);
|
| }
|
|
|
| void DownloadFileImpl::RenameAndUniquify(
|
|
|