Add timestamp to infobar for stale Previews

Desktop / Chromium - megjablon [chromium.org] - 20 June 2017 19:14 EDT

Add a feature to enable a timestamp on the Previews infobar. This timestamp should be shown when the previews_freshness is greater than the finch controlled "min_staleness_in_minutes" and less than "max_staleness_in_minutes".

BUG=718643

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

fa7b3da Add timestamp to infobar for stale Previews
chrome/app/generated_resources.grd | 9 ++
.../data_reduction_proxy_chrome_io_data.cc | 3 +-
.../browser/previews/previews_infobar_delegate.cc | 70 ++++++++-
.../browser/previews/previews_infobar_delegate.h | 8 +-
.../previews/previews_infobar_delegate_unittest.cc | 168 ++++++++++++++++-----
.../previews/previews_infobar_tab_helper.cc | 5 +-
.../core/browser/data_reduction_proxy_io_data.cc | 1 +
components/previews/core/previews_features.cc | 4 +
components/previews/core/previews_features.h | 1 +
9 files changed, 230 insertions(+), 39 deletions(-)

Upstream: git.chromium.org


  • Share