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

Unified Diff: components/ntp_tiles/most_visited_sites.h

Issue 2572133002: Add more features to ntp-tiles-internal (Closed)
Patch Set: remove unneeded include Created 4 years 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
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 1b1f9f5396d61e6623fe100d7c8f54fb48bb631e..92d1b543497e2a2b56ee93777bd4c56298fe8bdb 100644
--- a/components/ntp_tiles/most_visited_sites.h
+++ b/components/ntp_tiles/most_visited_sites.h
@@ -101,6 +101,19 @@ class MostVisitedSites : public history::TopSitesObserver,
~MostVisitedSites() override;
+ // Returns true if this object was created with a non-null provider for the
+ // given NTP tile source. That source may or may not actually provide tiles,
+ // depending on its configuration and the priority of different sources.
+ bool DoesSourceExist(NTPTileSource source) const;
+
+ // Returns the corresponding object passed at construction.
+ history::TopSites* top_sites() const { return top_sites_.get(); }
+ suggestions::SuggestionsService* suggestions() const {
+ return suggestions_service_;
+ }
+ PopularSites* popular_sites() const { return popular_sites_.get(); }
+ MostVisitedSitesSupervisor* supervisor() const { return supervisor_.get(); }
Marc Treib 2016/12/14 15:06:26 If these return non-const pointers, then they shou
sfiera 2016/12/15 09:59:13 Made non-const (const would be nice, but Suggestio
+
// Sets the observer, and immediately fetches the current suggestions.
// Does not take ownership of |observer|, which must outlive this object and
// must not be null.

Powered by Google App Engine
This is Rietveld 408576698