Currently, MostVisitedSites allows a null TopSites* to be passed in. All of its logic around top sites is gated on top_sites_ conditionally being available. We would prefer to DCHECK(top_sites_) in the constructor.
It's currently not possible to make this change because iOS passes null in tests (per TopSitesFactory::ServiceIsNULLWhileTesting()). If we could change that to pass a dummy object, that would work. Or, if we could make MostVisitedSites a KeyedService (crbug/619584) then we could have MostVisitedSites also be null under tests easily.
Comment 1 by treib@chromium.org
, Nov 17 2016Status: Assigned (was: Untriaged)