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

Unified Diff: components/ntp_tiles/most_visited_sites.h

Issue 2897293002: Adding CrHome-specific implementation for home page tile. (Closed)
Patch Set: Refactor tests and initialization Created 3 years, 7 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 | « chrome/browser/android/ntp/most_visited_sites_bridge.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 271d60849774a1c8f23c0845f9670ffca434c46d..1da5e182720537df2fc1f42a021066b1f4b83884 100644
--- a/components/ntp_tiles/most_visited_sites.h
+++ b/components/ntp_tiles/most_visited_sites.h
@@ -111,16 +111,6 @@ class MostVisitedSites : public history::TopSitesObserver,
suggestions::SuggestionsService* suggestions,
std::unique_ptr<PopularSites> popular_sites,
std::unique_ptr<IconCacher> icon_cacher,
- std::unique_ptr<MostVisitedSitesSupervisor> supervisor,
- std::unique_ptr<HomePageClient> home_page_client);
-
- // TODO(fhorschig): Adjust all factories and delete this.
- // Constructs a MostVisitedSites instance without HomePageClient.
- MostVisitedSites(PrefService* prefs,
- scoped_refptr<history::TopSites> top_sites,
- suggestions::SuggestionsService* suggestions,
- std::unique_ptr<PopularSites> popular_sites,
- std::unique_ptr<IconCacher> icon_cacher,
std::unique_ptr<MostVisitedSitesSupervisor> supervisor);
~MostVisitedSites() override;
@@ -143,6 +133,11 @@ class MostVisitedSites : public history::TopSitesObserver,
// must not be null.
void SetMostVisitedURLsObserver(Observer* observer, size_t num_sites);
+ // Sets the client that provides platform-specific home page preferences.
+ // When used to replace an existing client, the new client will first be used
+ // during the construction of a new tile set.
+ void SetHomePageClient(std::unique_ptr<HomePageClient> client);
+
// Requests an asynchronous refresh of the suggestions. Notifies the observer
// if the request resulted in the set of tiles changing.
void Refresh();
@@ -229,7 +224,7 @@ class MostVisitedSites : public history::TopSitesObserver,
std::unique_ptr<PopularSites> const popular_sites_;
std::unique_ptr<IconCacher> const icon_cacher_;
std::unique_ptr<MostVisitedSitesSupervisor> supervisor_;
- std::unique_ptr<HomePageClient> const home_page_client_;
+ std::unique_ptr<HomePageClient> home_page_client_;
Observer* observer_;
« no previous file with comments | « chrome/browser/android/ntp/most_visited_sites_bridge.cc ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698