| Index: content/browser/download/base_file.cc
|
| diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
|
| index b95ef97ed98c372ddddcb82f12144b11418735ee..50fdffd72d0232a89bf96ac7afe980f41a2f78e0 100644
|
| --- a/content/browser/download/base_file.cc
|
| +++ b/content/browser/download/base_file.cc
|
| @@ -109,6 +109,13 @@ DownloadInterruptReason BaseFile::WriteDataToFile(int64_t offset,
|
| return LogSystemError("Write", logging::GetLastSystemErrorCode());
|
|
|
| DCHECK_EQ(static_cast<size_t>(write_result), data_len);
|
| +
|
| + if (bytes_so_far_ != offset) {
|
| + // A hole is created in the file.
|
| + is_sparse_file_ = true;
|
| + secure_hash_.release();
|
| + }
|
| +
|
| bytes_so_far_ += data_len;
|
| net_log_.EndEvent(net::NetLogEventType::DOWNLOAD_FILE_WRITTEN,
|
| net::NetLog::Int64Callback("bytes", data_len));
|
|
|