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

Unified Diff: components/ntp_tiles/most_visited_sites.h

Issue 2572533002: Add ChromeMostVisitedSitesFactory (Closed)
Patch Set: Use factory for webui 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
« no previous file with comments | « chrome/browser/ui/webui/popular_sites_internals_ui.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 d097b1bc469974c307cf27518061f3737470e98d..1b1f9f5396d61e6623fe100d7c8f54fb48bb631e 100644
--- a/components/ntp_tiles/most_visited_sites.h
+++ b/components/ntp_tiles/most_visited_sites.h
@@ -53,6 +53,8 @@ class MostVisitedSitesSupervisor {
~Observer() {}
};
+ virtual ~MostVisitedSitesSupervisor() {}
+
// Pass non-null to set observer, or null to remove observer.
// If setting observer, there must not yet be an observer set.
// If removing observer, there must already be one to remove.
@@ -67,9 +69,6 @@ class MostVisitedSitesSupervisor {
// If true, be conservative about suggesting sites from outside sources.
virtual bool IsChildProfile() = 0;
-
- protected:
- virtual ~MostVisitedSitesSupervisor() {}
};
// Tracks the list of most visited sites and their thumbnails.
@@ -98,7 +97,7 @@ class MostVisitedSites : public history::TopSitesObserver,
suggestions::SuggestionsService* suggestions,
std::unique_ptr<PopularSites> popular_sites,
std::unique_ptr<IconCacher> icon_cacher,
- MostVisitedSitesSupervisor* supervisor);
+ std::unique_ptr<MostVisitedSitesSupervisor> supervisor);
~MostVisitedSites() override;
@@ -177,7 +176,7 @@ class MostVisitedSites : public history::TopSitesObserver,
suggestions::SuggestionsService* suggestions_service_;
std::unique_ptr<PopularSites> const popular_sites_;
std::unique_ptr<IconCacher> const icon_cacher_;
- MostVisitedSitesSupervisor* supervisor_;
+ std::unique_ptr<MostVisitedSitesSupervisor> supervisor_;
Observer* observer_;
« no previous file with comments | « chrome/browser/ui/webui/popular_sites_internals_ui.cc ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698