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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 870063002: Componentize TopSites, TopSitesBackend, TopSitesDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@815983002
Patch Set: Fix typo Created 5 years, 11 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 | « chrome/chrome_tests_unit.gypi ('k') | chrome/test/data/History/TopSites.v1.sql » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 625e74ba3a4180608a9911d1c882ab1ab88de467..7f49296f44b09f6d60f80d22b7e869255934cb0e 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -26,7 +26,6 @@
#include "chrome/browser/history/history_backend.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/history/top_sites_factory.h"
#include "chrome/browser/history/top_sites_impl.h"
#include "chrome/browser/history/web_history_service_factory.h"
@@ -59,6 +58,7 @@
#include "components/history/core/browser/history_constants.h"
#include "components/history/core/browser/history_database_params.h"
#include "components/history/core/browser/history_db_task.h"
+#include "components/history/core/browser/top_sites.h"
#include "components/history/core/browser/top_sites_observer.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/keyed_service/core/refcounted_keyed_service.h"
@@ -263,9 +263,11 @@ KeyedService* BuildWebDataService(content::BrowserContext* context) {
scoped_refptr<RefcountedKeyedService> BuildTopSites(
content::BrowserContext* profile) {
- history::TopSitesImpl* top_sites =
- new history::TopSitesImpl(static_cast<Profile*>(profile));
- top_sites->Init(profile->GetPath().Append(chrome::kTopSitesFilename));
+ history::TopSitesImpl* top_sites = new history::TopSitesImpl(
+ static_cast<Profile*>(profile), history::PrepopulatedPageList());
+ top_sites->Init(
+ profile->GetPath().Append(chrome::kTopSitesFilename),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB));
return make_scoped_refptr(top_sites);
}
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/test/data/History/TopSites.v1.sql » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698