Chromium Code Reviews| Index: components/ntp_tiles/most_visited_sites.h |
| diff --git a/components/ntp_tiles/most_visited_sites.h b/components/ntp_tiles/most_visited_sites.h |
| index 429be26fb2d7f4d4e2cad66077777a02a9551906..849c6b67ddd6184e1d40bd32fe60fa343bd405ea 100644 |
| --- a/components/ntp_tiles/most_visited_sites.h |
| +++ b/components/ntp_tiles/most_visited_sites.h |
| @@ -95,8 +95,38 @@ class MostVisitedSites : public history::TopSitesObserver, |
| using SuggestionsVector = std::vector<Suggestion>; |
| using PopularSitesVector = std::vector<PopularSites::Site>; |
| + // The visual type of a most visited tile. |
| + // |
| + // These values must stay in sync with the MostVisitedTileType enum |
| + // in histograms.xml. |
| + // |
| + // A Java counterpart will be generated for this enum. |
| + // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp |
| + enum MostVisitedTileType { |
| + // The icon or thumbnail hasn't loaded yet. |
| + NONE, |
| + // The item displays a site's actual favicon or touch icon. |
| + ICON_REAL, |
| + // The item displays a color derived from the site's favicon or touch icon. |
| + ICON_COLOR, |
| + // The item displays a default gray box in place of an icon. |
| + ICON_DEFAULT, |
| + NUM_TILE_TYPES, |
| + }; |
| + |
| // The source of the Most Visited sites. |
| - enum MostVisitedSource { TOP_SITES, SUGGESTIONS_SERVICE, POPULAR, WHITELIST }; |
| + // A Java counterpart will be generated for this enum. |
| + // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp |
| + enum MostVisitedSource { |
| + // Item comes from the personal top sites list. |
| + TOP_SITES, |
| + // Item comes from the suggestions service. |
| + SUGGESTIONS_SERVICE, |
| + // Item is regionally popular. |
| + POPULAR, |
| + // Item is on an administrator-managed whitelist. |
|
Marc Treib
2016/07/01 10:01:04
s/administrator/custodian (that's the terminology
dewittj
2016/07/01 21:35:21
Done.
|
| + WHITELIST |
| + }; |
| // The observer to be notified when the list of most visited sites changes. |
| class Observer { |
| @@ -149,7 +179,9 @@ class MostVisitedSites : public history::TopSitesObserver, |
| using ThumbnailCallback = base::Callback< |
| void(bool /* is_local_thumbnail */, const SkBitmap* /* bitmap */)>; |
| void AddOrRemoveBlacklistedUrl(const GURL& url, bool add_url); |
| - void RecordTileTypeMetrics(const std::vector<int>& tile_types); |
| + void RecordTileTypeMetrics(const std::vector<int>& tile_types, |
| + const std::vector<int>& sources, |
| + const std::vector<int>& provider_indices); |
| void RecordOpenedMostVisitedItem(int index, int tile_type); |
| // MostVisitedSitesSupervisor::Observer implementation. |