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..3b1755e913160c3930914055d0827fc694ad90e0 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, |
| + }; |
|
Marc Treib
2016/06/29 08:19:32
Any particular reason for moving this into the hea
dewittj
2016/06/30 17:48:54
A few reasons. This enum is exposed to Java, maki
Marc Treib
2016/07/01 10:01:03
Acknowledged.
|
| + |
| // 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 regional top sites list. |
|
Marc Treib
2016/06/29 08:19:32
Nope, these are the *personal* top sites.
Bernhard Bauer
2016/06/29 10:17:43
(The regional ones are called "popular sites" 😃)
dewittj
2016/06/30 17:48:54
Done.
|
| + TOP_SITES, |
| + // Item comes from the suggestions service. |
| + SUGGESTIONS_SERVICE, |
| + // Item is most popular. |
|
Marc Treib
2016/06/29 08:19:32
These are the regionally popular ones.
dewittj
2016/06/30 17:48:54
Done.
|
| + POPULAR, |
| + // Item on static whitelist |
|
Marc Treib
2016/06/29 08:19:32
s/static/supervised user/ ?
(These whitelists exis
dewittj
2016/06/30 17:48:54
Done.
|
| + WHITELIST |
| + }; |
| // The observer to be notified when the list of most visited sites changes. |
| class Observer { |
| @@ -149,7 +179,6 @@ 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 RecordOpenedMostVisitedItem(int index, int tile_type); |
| // MostVisitedSitesSupervisor::Observer implementation. |