[Offline Pages] Implementing add page task

Desktop / Chromium - Yafei Duan [chromium.org] - 11 September 2017 19:04 EDT

Implementing AddPageTask which will insert a page into metedata store, then invoke the callback with an AddPageResult. This is part of the OfflinePageModel taskification. Also OfflineStoreUtils is introduced, containing the utility methods used in tasks. The unit test will be in another patch, in order to adopt the testing framework which will be landed with GetPageTask.

Bug: 753595 Change-Id: I4ef848c24d40217e0e071a72aae49c3fdd9a3f70 Reviewed-on: https://chromium-review.googlesource.com/636725 Commit-Queue: Yafei Duan

ec3e7a8 [Offline Pages] Implementing add page task.
components/offline_pages/core/BUILD.gn | 4 +
.../offline_pages/core/model/add_page_task.cc | 96 ++++++++++++++++++++++
.../offline_pages/core/model/add_page_task.h | 53 ++++++++++++
.../core/model/offline_store_utils.cc | 38 +++++++++
.../offline_pages/core/model/offline_store_utils.h | 30 +++++++
5 files changed, 221 insertions(+)

Upstream: git.chromium.org


  • Share