Let IndexedDBContextImpl create its own task runner

Desktop / Chromium - jsbell [chromium.org] - 13 July 2017 21:13 EDT

Have the IndexedDBContextImpl create its own sequenced task runner (via the task scheduler), rather than having it injected on creation.

Unit tests needed updating to ensure objects (factory, backing store, transactions, etc) are created on the appropriate sequences and that operations (e.g. blob writes) do correct thread hopping. This makes the tests more correct, but also more complicated.

BUG=552552

Review-Url: https://codereview.chromium.org/2930183002 Cr-Commit-Position: refs/heads/master@{#486588}

bd2caa0 Let IndexedDBContextImpl create its own task runner
.../browsing_data_indexed_db_helper_unittest.cc | 5 -
.../extensions/app_data_migrator_unittest.cc | 2 -
.../extensions/extension_service_unittest.cc | 12 +-
.../indexed_db_backing_store_unittest.cc | 1542 ++++++++++++--------
.../browser/indexed_db/indexed_db_context_impl.cc | 29 +-
.../browser/indexed_db/indexed_db_context_impl.h | 24 +-
.../indexed_db/indexed_db_dispatcher_host.cc | 33 +-
.../indexed_db/indexed_db_dispatcher_host.h | 3 +-
.../indexed_db_dispatcher_host_unittest.cc | 67 +-
.../indexed_db/indexed_db_factory_unittest.cc | 779 ++++++----
.../browser/indexed_db/indexed_db_quota_client.cc | 24 -
.../indexed_db/indexed_db_quota_client_unittest.cc | 35 +-
content/browser/indexed_db/indexed_db_unittest.cc | 244 ++--
content/browser/storage_partition_impl.cc | 21 +-
content/public/browser/indexed_db_context.h | 5 +-
15 files changed, 1591 insertions(+), 1234 deletions(-)

Upstream: git.chromium.org


  • Share