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

Unified Diff: components/ntp_tiles/most_visited_sites.cc

Issue 2897293002: Adding CrHome-specific implementation for home page tile. (Closed)
Patch Set: 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
Index: components/ntp_tiles/most_visited_sites.cc
diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/most_visited_sites.cc
index 19c2f957f89efe1f1a5b08014a72b494071f9f95..df086313be5415b218071f1cde5ababe29fdf323 100644
--- a/components/ntp_tiles/most_visited_sites.cc
+++ b/components/ntp_tiles/most_visited_sites.cc
@@ -52,15 +52,14 @@ MostVisitedSites::MostVisitedSites(
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)
+ std::unique_ptr<MostVisitedSitesSupervisor> supervisor)
: prefs_(prefs),
top_sites_(top_sites),
suggestions_service_(suggestions),
popular_sites_(std::move(popular_sites)),
icon_cacher_(std::move(icon_cacher)),
supervisor_(std::move(supervisor)),
- home_page_client_(std::move(home_page_client)),
+ home_page_client_(nullptr),
observer_(nullptr),
num_sites_(0u),
top_sites_observer_(this),
@@ -74,21 +73,6 @@ MostVisitedSites::MostVisitedSites(
supervisor_->SetObserver(this);
}
-MostVisitedSites::MostVisitedSites(
- PrefService* prefs,
- scoped_refptr<history::TopSites> top_sites,
- SuggestionsService* suggestions,
- std::unique_ptr<PopularSites> popular_sites,
- std::unique_ptr<IconCacher> icon_cacher,
- std::unique_ptr<MostVisitedSitesSupervisor> supervisor)
- : MostVisitedSites(prefs,
- top_sites,
- suggestions,
- std::move(popular_sites),
- std::move(icon_cacher),
- std::move(supervisor),
- nullptr) {}
-
MostVisitedSites::~MostVisitedSites() {
if (supervisor_)
supervisor_->SetObserver(nullptr);
@@ -111,6 +95,12 @@ bool MostVisitedSites::DoesSourceExist(TileSource source) const {
return false;
}
+void MostVisitedSites::SetHomePageClient(
+ std::unique_ptr<HomePageClient> client) {
+ DCHECK(client);
+ home_page_client_ = std::move(client);
+}
+
void MostVisitedSites::SetMostVisitedURLsObserver(Observer* observer,
size_t num_sites) {
DCHECK(observer);

Powered by Google App Engine
This is Rietveld 408576698