Prefetching: Introduce store commands abstractions to be used by tasks

Desktop / Chromium - carlosk [chromium.org] - 17 June 2017 05:54 EDT

Updates AddUniqueUrlsTask (still empty of actual business logic) to use store commands as an abstraction layer for the execution of operations on the persistent prefetching store. Only concrete test version of commands are provided; actual SQL backer implementations will come later.

This also adds all the business logic needed for that task to work as the 1st step of the prefetching pipeline but for NWake scheduling. The latter will require a new abstraction to be created and will be left for a follow up patch.

BUG=701939

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

12e48fc Prefetching: Introduce store commands abstractions to be used by tasks.
.../prefetch/prefetch_service_factory.cc | 10 +++---
components/offline_pages/core/prefetch/BUILD.gn | 3 --
components/offline_pages/core/prefetch/README.md | 28 +++++++++++++--
.../core/prefetch/add_unique_urls_task.cc | 40 ++++++++++++++++++++--
.../core/prefetch/add_unique_urls_task.h | 9 ++---
.../core/prefetch/prefetch_dispatcher.h | 1 +
.../core/prefetch/prefetch_dispatcher_impl.cc | 5 +--
.../core/prefetch/prefetch_dispatcher_impl.h | 1 +
.../prefetch/prefetch_dispatcher_impl_unittest.cc | 35 ++++++++++---------
.../core/prefetch/prefetch_in_memory_store.cc | 13 -------
.../core/prefetch/prefetch_in_memory_store.h | 21 ------------
.../offline_pages/core/prefetch/prefetch_service.h | 4 +--
.../core/prefetch/prefetch_service_impl.cc | 7 ----
.../core/prefetch/prefetch_service_impl.h | 3 --
.../core/prefetch/prefetch_service_test_taco.cc | 11 +-----
.../core/prefetch/prefetch_service_test_taco.h | 4 ---
.../offline_pages/core/prefetch/prefetch_store.h | 18 ----------
.../offline_pages/core/prefetch/prefetch_types.h | 14 ++++----
.../core/prefetch/suggested_articles_observer.cc | 13 +++----
.../suggested_articles_observer_unittest.cc | 10 +++---
.../core/prefetch/test_prefetch_dispatcher.cc | 6 ++--
.../core/prefetch/test_prefetch_dispatcher.h | 4 ++-
22 files changed, 120 insertions(+), 140 deletions(-)

Upstream: git.chromium.org


  • Share