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

Unified Diff: components/ntp_tiles/most_visited_sites.cc

Issue 2395483002: Allow top_sites to be null. (Closed)
Patch Set: Add comment/TODO. 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/most_visited_sites.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6917269cd739221b6e28799664b614187ea001db..309a0b48d1568e234d25a7e34c950e3634eaf245 100644
--- a/components/ntp_tiles/most_visited_sites.cc
+++ b/components/ntp_tiles/most_visited_sites.cc
@@ -159,7 +159,8 @@ MostVisitedSites::MostVisitedSites(PrefService* prefs,
mv_source_(NTPTileSource::SUGGESTIONS_SERVICE),
weak_ptr_factory_(this) {
DCHECK(prefs_);
- DCHECK(top_sites_);
+ // top_sites_ can be null in tests.
+ // TODO(sfiera): have iOS use a dummy TopSites in its tests.
DCHECK(suggestions_service_);
if (supervisor_)
supervisor_->SetObserver(this);
« no previous file with comments | « components/ntp_tiles/most_visited_sites.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698