Index: content/browser/download/download_file_impl.h |
diff --git a/content/browser/download/download_file_impl.h b/content/browser/download/download_file_impl.h |
index 7b9ea68bd258a3e03793c1a675d3d99bd22f6876..e786c2b38b0fff0400e9f4d9bed85463b60b22b9 100644 |
--- a/content/browser/download/download_file_impl.h |
+++ b/content/browser/download/download_file_impl.h |
@@ -49,7 +49,6 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile { |
std::unique_ptr<ByteStreamReader> stream_reader, |
const std::vector<DownloadItem::ReceivedSlice>& received_slices, |
const net::NetLogWithSource& net_log, |
- bool is_sparse_file, |
base::WeakPtr<DownloadDestinationObserver> observer); |
~DownloadFileImpl() override; |
@@ -222,6 +221,9 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile { |
void HandleStreamError(SourceStream* source_stream, |
DownloadInterruptReason reason); |
+ // Check whether this file is potentially sparse. |
+ bool IsSparseFile() const; |
+ |
// Given a SourceStream object, returns its neighbor that preceds it if |
// SourceStreams are ordered by their offsets |
SourceStream* FindPrecedingNeighbor(SourceStream* source_stream); |
@@ -249,12 +251,6 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile { |
// Used to trigger progress updates. |
std::unique_ptr<base::RepeatingTimer> update_timer_; |
- // Set to true when multiple byte streams write to the same file. |
- // The file may contain null bytes(holes) in between of valid data slices. |
- // TODO(xingliu): Remove this variable. We can use size of |received_slices_| |
- // to determine if the file is sparse |
- bool is_sparse_file_; |
- |
// Statistics |
size_t bytes_seen_; |
base::TimeDelta disk_writes_time_; |