Add a throttle wrapper to OfflineContentProvider

Desktop / Chromium - dtrainor [chromium.org] - 22 March 2017 23:12 EDT

This adds a class that supports automatically throttling updates driven by OfflineContentProviders. This allows the UI to limit the amount of updates sent by underlying providers to a reasonable rate.

BUG=691805

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

cd5c145 Add a throttle wrapper to OfflineContentProvider
components/offline_items_collection/core/BUILD.gn | 3 +
.../core/throttled_offline_content_provider.cc | 154 ++++++++++++
.../core/throttled_offline_content_provider.h | 83 ++++++
.../throttled_offline_content_provider_unittest.cc | 279 +++++++++++++++++++++
4 files changed, 519 insertions(+)

Upstream: git.chromium.org


  • Share