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

Unified Diff: chrome/browser/history/top_sites_impl_unittest.cc

Issue 815983002: Topsites become keyedService based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 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
Index: chrome/browser/history/top_sites_impl_unittest.cc
diff --git a/chrome/browser/history/top_sites_impl_unittest.cc b/chrome/browser/history/top_sites_impl_unittest.cc
index 799a011e2d2bbd523247ed4ae7b8015782a1a49b..020c1b38e192f893a87c2945060df077e6c42974 100644
--- a/chrome/browser/history/top_sites_impl_unittest.cc
+++ b/chrome/browser/history/top_sites_impl_unittest.cc
@@ -54,8 +54,7 @@ TestTopSitesObserver::TestTopSitesObserver(Profile* profile,
void TestTopSitesObserver::TopSitesLoaded(history::TopSites* top_sites) {
content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_TOP_SITES_LOADED,
- content::Source<Profile>(profile_),
+ chrome::NOTIFICATION_TOP_SITES_LOADED, content::Source<Profile>(profile_),
content::Details<history::TopSites>(top_sites));
}
@@ -236,7 +235,8 @@ class TopSitesImplTest : public HistoryUnitTestBase {
}
TopSitesImpl* top_sites() {
- return static_cast<TopSitesImpl*>(profile_->GetTopSites());
+ return static_cast<TopSitesImpl*>(
+ TopSitesServiceFactory::GetForProfile(profile_));
sdefresne 2014/12/29 09:48:14 nit: TopSitesServiceFactory::GetForProfile(profile
Jitu( very slow this week) 2014/12/30 10:09:03 Done.
}
TestingProfile* profile() {return profile_.get();}
HistoryService* history_service() {
@@ -369,9 +369,9 @@ class TopSitesImplTest : public HistoryUnitTestBase {
if (top_sites_observer_)
top_sites_observer_.reset();
- profile_->CreateTopSites();
+ profile_->CreateTopSitesService();
top_sites_observer_.reset(
- new TestTopSitesObserver(profile_.get(), profile_->GetTopSites()));
+ new TestTopSitesObserver(profile_.get(), TopSitesServiceFactory::GetForProfile(profile_));
}
private:

Powered by Google App Engine
This is Rietveld 408576698