[Offline Pages] Implementing create archive task

Desktop / Chromium - Yafei Duan [chromium.org] - 12 September 2017 20:13 EDT

Implementing CreateArchiveTask, which is a task for starting the archive creation but will not wait for the completion of the process, in order to support multiple archivers working in parallel. The creator of the task has to provide a CreateArchiveTaskCallback, which will be processing the arguments and decide whether the creation is successful, so that it can create AddPageTask for next steps. Also duplicating most of the tests related with archive creation from the OfflinePageModelImpl unit tests.

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

b64cace [Offline Pages] Implementing create archive task.
components/offline_pages/core/BUILD.gn | 3 +
.../core/model/create_archive_task.cc | 95 +++++
.../offline_pages/core/model/create_archive_task.h | 92 +++++
.../core/model/create_archive_task_unittest.cc | 412 +++++++++++++++++++++
.../core/model/offline_store_utils.cc | 8 +
.../offline_pages/core/model/offline_store_utils.h | 4 +
.../offline_pages/core/offline_page_archiver.h | 4 +-
components/offline_pages/core/offline_page_item.cc | 3 +-
8 files changed, 619 insertions(+), 2 deletions(-)

Upstream: git.chromium.org


  • Share