Chromium Code Reviews| 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 23d6ce58d2ee87e8d153bbd926fed44dc5c42bb4..aae60599390c93a70398cd99dca7e65ae3efdb3c 100644 |
| --- a/content/browser/download/download_file_impl.h |
| +++ b/content/browser/download/download_file_impl.h |
| @@ -19,7 +19,7 @@ |
| #include "base/macros.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/weak_ptr.h" |
| -#include "base/threading/thread_checker.h" |
| +#include "base/sequence_checker.h" |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| #include "content/browser/byte_stream.h" |
| @@ -38,17 +38,16 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile { |
| // Takes ownership of the object pointed to by |request_handle|. |
| // |net_log| will be used for logging the download file's events. |
| // May be constructed on any thread. All methods besides the constructor |
| - // (including destruction) must occur on the FILE thread. |
| + // (including destruction) must occur on the download task runner. |
|
fdoray
2017/06/22 13:01:35
s/download task runner/same sequence/ ?
Since you'
Sigurður Ásgeirsson
2017/06/22 14:50:11
Done.
|
| // |
| // Note that the DownloadFileImpl automatically reads from the passed in |
| // stream, and sends updates and status of those reads to the |
| // DownloadDestinationObserver. |
| - DownloadFileImpl( |
| - std::unique_ptr<DownloadSaveInfo> save_info, |
| - const base::FilePath& default_downloads_directory, |
| - std::unique_ptr<ByteStreamReader> stream_reader, |
| - const net::NetLogWithSource& net_log, |
| - base::WeakPtr<DownloadDestinationObserver> observer); |
| + DownloadFileImpl(std::unique_ptr<DownloadSaveInfo> save_info, |
| + const base::FilePath& default_downloads_directory, |
| + std::unique_ptr<ByteStreamReader> stream_reader, |
| + const net::NetLogWithSource& net_log, |
| + base::WeakPtr<DownloadDestinationObserver> observer); |
| ~DownloadFileImpl() override; |
| @@ -279,6 +278,8 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile { |
| std::vector<DownloadItem::ReceivedSlice> received_slices_; |
| + SEQUENCE_CHECKER(sequence_checker_); |
| + |
| base::WeakPtr<DownloadDestinationObserver> observer_; |
| base::WeakPtrFactory<DownloadFileImpl> weak_factory_; |