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 28f9b070df0a6421fec0400df63b023a84af57ec..aad5edac2e25ba3e6235ddaec5d918250b9b7558 100644 |
| --- a/components/ntp_tiles/most_visited_sites.h |
| +++ b/components/ntp_tiles/most_visited_sites.h |
| @@ -34,6 +34,8 @@ class PrefRegistrySyncable; |
| namespace ntp_tiles { |
| +class IconCacher; |
| + |
| // Shim interface for SupervisedUserService. |
| class MostVisitedSitesSupervisor { |
| public: |
| @@ -105,7 +107,8 @@ class MostVisitedSites : public history::TopSitesObserver, |
| class Observer { |
| public: |
| virtual void OnMostVisitedURLsAvailable(const NTPTilesVector& tiles) = 0; |
| - virtual void OnPopularURLsAvailable(const PopularSitesVector& sites) {} |
| + // TODO(sfiera): make this method required after iOS implements it: |
| + virtual void OnIconMadeAvailable(const GURL& site_url) {} |
| protected: |
| virtual ~Observer() {} |
| @@ -120,6 +123,7 @@ class MostVisitedSites : public history::TopSitesObserver, |
| scoped_refptr<history::TopSites> top_sites, |
| suggestions::SuggestionsService* suggestions, |
| std::unique_ptr<PopularSites> popular_sites, |
| + std::unique_ptr<IconCacher> icon_cacher, |
| MostVisitedSitesSupervisor* supervisor); |
| ~MostVisitedSites() override; |
| @@ -143,6 +147,8 @@ class MostVisitedSites : public history::TopSitesObserver, |
| private: |
| friend class MostVisitedSitesTest; |
| + void OnIconMadeAvailable(const GURL& site_url, bool newly_available); |
|
Marc Treib
2016/10/12 09:11:29
nit: Maybe move this below OnPopularSitesAvailable
sfiera
2016/10/13 09:06:46
Done.
|
| + |
| void BuildCurrentTiles(); |
| // Initialize the query to Top Sites. Called if the SuggestionsService |
| @@ -198,6 +204,7 @@ class MostVisitedSites : public history::TopSitesObserver, |
| scoped_refptr<history::TopSites> top_sites_; |
| suggestions::SuggestionsService* suggestions_service_; |
| std::unique_ptr<PopularSites> const popular_sites_; |
| + std::unique_ptr<IconCacher> const icon_cacher_; |
| MostVisitedSitesSupervisor* supervisor_; |
| Observer* observer_; |