Add initial Controller to DownloadService

Desktop / Chromium - dtrainor [chromium.org] - 31 May 2017 15:34 EDT

Add the basic structure for a Controller, which is responsible for gluing the Model and DownloadDriver in DownloadService. Initial support in this patch includes:
- Successful initialization path of Model and DownloadDriver.- All possible paths for supporting StartDownload (minus actually sending the request to the DownloadDriver).

BUG=722705

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

7f99e41 Add initial Controller to DownloadService
.../browser/download/download_service_factory.cc | 7 +-
components/download/internal/BUILD.gn | 14 +
components/download/internal/client_set.cc | 30 ++
components/download/internal/client_set.h | 35 ++
.../download/internal/client_set_unittest.cc | 43 +++
components/download/internal/config.cc | 33 +-
components/download/internal/config.h | 8 +-
components/download/internal/controller.h | 63 ++++
components/download/internal/controller_impl.cc | 267 ++++++++++++++++
components/download/internal/controller_impl.h | 119 +++++++
.../download/internal/controller_impl_unittest.cc | 356 +++++++++++++++++++++
components/download/internal/download_driver.h | 2 +
.../download/internal/download_service_impl.cc | 83 ++++-
.../download/internal/download_service_impl.h | 8 +-
.../internal/download_service_impl_unittest.cc | 29 ++
components/download/internal/download_store.h | 3 +-
components/download/internal/entry.cc | 7 +
components/download/internal/entry.h | 1 +
components/download/internal/entry_utils.cc | 39 +++
components/download/internal/entry_utils.h | 37 +++
.../download/internal/entry_utils_unittest.cc | 65 ++++
components/download/internal/model.h | 4 +-
components/download/internal/model_impl.cc | 28 +-
components/download/internal/model_impl.h | 6 +-
.../download/internal/model_impl_unittest.cc | 42 +--
components/download/internal/startup_status.cc | 21 ++
components/download/internal/startup_status.h | 36 +++
components/download/internal/stats.cc | 33 ++
components/download/internal/stats.h | 81 +++++
components/download/internal/test/BUILD.gn | 4 +
components/download/internal/test/empty_client.cc | 34 ++
components/download/internal/test/empty_client.h | 42 +++
components/download/internal/test/mock_client.cc | 14 +
components/download/internal/test/mock_client.h | 41 +++
.../download/internal/test/mock_model_client.h | 2 +-
.../download/internal/test/test_download_driver.cc | 4 +-
.../download/internal/test/test_download_driver.h | 4 +-
components/download/public/clients.h | 7 +
components/download/public/download_params.h | 19 +-
components/download/public/download_service.h | 27 ++
40 files changed, 1624 insertions(+), 74 deletions(-)

Upstream: git.chromium.org


  • Share