diff options
Diffstat (limited to 'components/offline_pages')
-rw-r--r-- | components/offline_pages/offline_page_model.cc | 5 | ||||
-rw-r--r-- | components/offline_pages/offline_page_model.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/components/offline_pages/offline_page_model.cc b/components/offline_pages/offline_page_model.cc index 564e71b..09633fb 100644 --- a/components/offline_pages/offline_page_model.cc +++ b/components/offline_pages/offline_page_model.cc @@ -10,6 +10,7 @@ #include "base/files/file_util.h" #include "base/location.h" #include "base/logging.h" +#include "base/sequenced_task_runner.h" #include "components/offline_pages/offline_page_item.h" #include "components/offline_pages/offline_page_metadata_store.h" #include "url/gurl.h" @@ -50,7 +51,7 @@ SavePageResult ToSavePageResult(ArchiverResult archiver_result) { OfflinePageModel::OfflinePageModel( scoped_ptr<OfflinePageMetadataStore> store, - const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) + const scoped_refptr<base::SequencedTaskRunner>& task_runner) : store_(store.Pass()), task_runner_(task_runner), weak_ptr_factory_(this) { @@ -187,7 +188,7 @@ void OfflinePageModel::OnLoadDoneForDeletion( void OfflinePageModel::DeleteArchiverFile(const base::FilePath& file_path, bool* success) { DCHECK(success); - DCHECK(task_runner_->BelongsToCurrentThread()); + DCHECK(task_runner_->RunsTasksOnCurrentThread()); *success = base::DeleteFile(file_path, false); } diff --git a/components/offline_pages/offline_page_model.h b/components/offline_pages/offline_page_model.h index 93ee5eb..f24d8f8 100644 --- a/components/offline_pages/offline_page_model.h +++ b/components/offline_pages/offline_page_model.h @@ -84,7 +84,7 @@ class OfflinePageModel : public KeyedService { // All blocking calls/disk access will happen on the provided |task_runner|. OfflinePageModel( scoped_ptr<OfflinePageMetadataStore> store, - const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); + const scoped_refptr<base::SequencedTaskRunner>& task_runner); ~OfflinePageModel() override; // KeyedService implementation. @@ -146,7 +146,7 @@ class OfflinePageModel : public KeyedService { // Persistent store for offline page metadata. scoped_ptr<OfflinePageMetadataStore> store_; - scoped_refptr<base::SingleThreadTaskRunner> task_runner_; + scoped_refptr<base::SequencedTaskRunner> task_runner_; // Pending archivers owned by this model. PendingArchivers pending_archivers_; |