Parse additional sections for popular sites

Desktop / Chromium - Friedrich Horschig [chromium.org] - 8 August 2017 12:53 EDT

This CL introduces sections to popular sites that contain unpersonalized tiles grouped by topics. The current popular sites are moved into the PERSONALIZED section. New sections are parsed from the same JSON. In order to keep backwards compatibility, the parsing checks version and structure of the JSON.

Bug: 740904 Change-Id: I0c89977d208c3fb7b54135f92a8141da6b931504 Reviewed-on: https://chromium-review.googlesource.com/593651 Commit-Queue: Friedrich Horschig

f481837 Parse additional sections for popular sites
components/ntp_tiles/BUILD.gn | 2 +
components/ntp_tiles/constants.cc | 3 +
components/ntp_tiles/constants.h | 3 +
components/ntp_tiles/most_visited_sites.cc | 8 +-
.../ntp_tiles/most_visited_sites_unittest.cc | 4 +-
components/ntp_tiles/popular_sites.h | 6 +-
components/ntp_tiles/popular_sites_impl.cc | 100 +++++++--
components/ntp_tiles/popular_sites_impl.h | 6 +-
.../ntp_tiles/popular_sites_impl_unittest.cc | 246 ++++++++++++++++-----
components/ntp_tiles/pref_names.cc | 6 +
components/ntp_tiles/pref_names.h | 5 +
components/ntp_tiles/section_type.h | 30 +++
12 files changed, 335 insertions(+), 84 deletions(-)

Upstream: git.chromium.org


  • Share