Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: components/ntp_tiles/most_visited_sites.h

Issue 2388783004: Ensure PopularSite icon availability in ntp_tiles. (Closed)
Patch Set: Merge branch 'master' into icons Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ntp_tiles/icon_cacher_unittest.cc ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b305a4da920654703a3ebc3f1ae425c7e4a89a71..67b8243267628ed06d37ce488e77b879de7690c0 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:
@@ -86,7 +88,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() {}
@@ -101,6 +104,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;
@@ -162,6 +166,8 @@ class MostVisitedSites : public history::TopSitesObserver,
void OnPopularSitesAvailable(bool success);
+ void OnIconMadeAvailable(const GURL& site_url, bool newly_available);
+
// history::TopSitesObserver implementation.
void TopSitesLoaded(history::TopSites* top_sites) override;
void TopSitesChanged(history::TopSites* top_sites,
@@ -171,6 +177,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_;
« no previous file with comments | « components/ntp_tiles/icon_cacher_unittest.cc ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698