| 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 61f1f4d90bb054a524b32e402f78111c7d1de5a0..f9101763f493153125da247f6f2f6180a2aba4ea 100644
|
| --- a/content/browser/download/download_file_impl.h
|
| +++ b/content/browser/download/download_file_impl.h
|
| @@ -58,7 +58,8 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
|
| void Initialize(const InitializeCallback& callback) override;
|
|
|
| void AddByteStream(std::unique_ptr<ByteStreamReader> stream_reader,
|
| - int64_t offset) override;
|
| + int64_t offset,
|
| + int64_t length) override;
|
|
|
| void RenameAndUniquify(const base::FilePath& full_path,
|
| const RenameCompletionCallback& callback) override;
|
| @@ -94,8 +95,6 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
|
| // |stream_reader_| can be set later when the network response is handled.
|
| //
|
| // Multiple SourceStreams can concurrently write to the same file sink.
|
| - //
|
| - // The file IO processing is finished when all SourceStreams are finished.
|
| class CONTENT_EXPORT SourceStream {
|
| public:
|
| SourceStream(int64_t offset, int64_t length);
|
| @@ -203,11 +202,8 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
|
|
|
| // Map of the offset and the source stream that represents the slice
|
| // starting from offset.
|
| - // Must be created on the same thread that constructs the DownloadFile.
|
| - // Should not add or remove elements after creation.
|
| - // Any byte stream should have a SourceStream before added to the download
|
| - // file.
|
| - // The disk IO is completed when all source streams are finished.
|
| + // Can be modified in constructor on any thread, later must be accessed on
|
| + // file thread.
|
| SourceStreams source_streams_;
|
|
|
| // Used to trigger progress updates.
|
|
|