Chromium Code Reviews| Index: content/browser/storage_partition_impl.cc |
| diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc |
| index dbea3089dcedd5db9aadf7a77f1ca91fa4c4a054..8c46f556e00f899dca649f600e119e296e70ece8 100644 |
| --- a/content/browser/storage_partition_impl.cc |
| +++ b/content/browser/storage_partition_impl.cc |
| @@ -15,6 +15,7 @@ |
| #include "base/sequenced_task_runner.h" |
| #include "base/single_thread_task_runner.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "base/task_scheduler/post_task.h" |
| #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
| #include "content/browser/browser_main_loop.h" |
| #include "content/browser/browsing_data/storage_partition_http_cache_data_remover.h" |
| @@ -473,14 +474,15 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create( |
| // BrowserMainLoop may not be initialized in unit tests. Tests will |
| // need to inject their own task runner into the IndexedDBContext. |
| - base::SequencedTaskRunner* idb_task_runner = |
| + scoped_refptr<base::SequencedTaskRunner> idb_task_runner = |
|
jsbell
2017/06/06 00:31:29
It would be nice to push this into the context its
|
| BrowserThread::CurrentlyOn(BrowserThread::UI) && |
| BrowserMainLoop::GetInstance() |
| - ? BrowserMainLoop::GetInstance() |
| - ->indexed_db_thread() |
| - ->task_runner() |
| - .get() |
| - : NULL; |
| + ? base::CreateSequencedTaskRunnerWithTraits({ |
| + base::MayBlock(), base::WithBaseSyncPrimitives(), |
| + base::TaskPriority::BACKGROUND, |
| + base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN, |
| + }) |
| + : nullptr; |
| base::FilePath path = in_memory ? base::FilePath() : partition_path; |
| partition->indexed_db_context_ = |