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

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 the review comments 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..e5b9209f6cf585f880fb7eb5993ebbf98550180f 100644
--- a/chrome/browser/history/top_sites_impl_unittest.cc
+++ b/chrome/browser/history/top_sites_impl_unittest.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/history/top_sites_cache.h"
#include "chrome/browser/history/top_sites_impl.h"
+#include "chrome/browser/history/top_sites_factory.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/testing_profile.h"
@@ -54,8 +55,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 +236,8 @@ class TopSitesImplTest : public HistoryUnitTestBase {
}
TopSitesImpl* top_sites() {
- return static_cast<TopSitesImpl*>(profile_->GetTopSites());
+ return static_cast<TopSitesImpl*>(
+ TopSitesFactory::GetForProfile(profile_).get());
}
TestingProfile* profile() {return profile_.get();}
HistoryService* history_service() {
@@ -369,9 +370,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(), TopSitesFactory::GetForProfile(profile_));
Bernhard Bauer 2015/01/06 11:10:30 Please fit this into 80 columns.
Jitu( very slow this week) 2015/01/08 09:38:25 Done.
}
private:

Powered by Google App Engine
This is Rietveld 408576698