Currently OnDownloadSucceeded and OnDownloadFailed are the only way to notify the client about a completed/failed download. After that, there is no way to get the info for these completed/failed downloads.
jianli@: Would it make more sense to expose the currently watched downloads in the OnServiceAvailable() method? wdyt?
That should also work. Thanks.
I can start to work on this.
Ok sg. Punting to you.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/294e23dea4714038482d8b274c1a728bfa1a2018 commit 294e23dea4714038482d8b274c1a728bfa1a2018 Author: Xing Liu <xingliu@chromium.org> Date: Fri Aug 18 20:23:05 2017 Download service: Add DownloadMetaData in public client API. This CL introduces DownloadMetaData that will pass to client when the service is initialized. DownloadMetaData includes in-progress downloads and succesfully completed downloads that are not cleaned up yet within 12 hours. DownloadMetaData will not have failed downloads, which are removed immediately from database. Bug: 753172 Change-Id: Ic7b47d1bc7d487d06c4b62a4759636825350745c Reviewed-on: https://chromium-review.googlesource.com/614874 Commit-Queue: Xing Liu <xingliu@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Reviewed-by: Shakti Sahu <shaktisahu@chromium.org> Reviewed-by: Jian Li <jianli@chromium.org> Cr-Commit-Position: refs/heads/master@{#495666} [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.h [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/controller_impl.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/controller_impl.h [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/controller_impl_unittest.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/entry.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/entry.h [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/entry_utils.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/entry_utils.h [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/entry_utils_unittest.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/proto/entry.proto [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/proto_conversions.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/proto_conversions_unittest.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/test/empty_client.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/test/empty_client.h [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/test/entry_utils.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/test/entry_utils.h [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/test/mock_client.h [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/test/test_download_service.cc [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/internal/test/test_download_service.h [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/public/BUILD.gn [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/public/client.h [add] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/public/download_metadata.cc [add] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/download/public/download_metadata.h [modify] https://crrev.com/294e23dea4714038482d8b274c1a728bfa1a2018/components/offline_pages/core/prefetch/prefetch_downloader_impl_unittest.cc
Comment 1 by dah...@chromium.org
, Aug 10 2017