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

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

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Replace in .mm files Created 4 years, 4 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
Index: chrome/browser/history/history_service_factory.cc
diff --git a/chrome/browser/history/history_service_factory.cc b/chrome/browser/history/history_service_factory.cc
index 30f9f3ecef1f2ab8459f4b1105d78cc78e353f38..ae573881e9f6aa76fbba66440ad33f617f5f9c3e 100644
--- a/chrome/browser/history/history_service_factory.cc
+++ b/chrome/browser/history/history_service_factory.cc
@@ -77,14 +77,13 @@ HistoryServiceFactory::~HistoryServiceFactory() {
KeyedService* HistoryServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- Profile* profile = Profile::FromBrowserContext(context);
std::unique_ptr<history::HistoryService> history_service(
new history::HistoryService(
base::WrapUnique(new ChromeHistoryClient(
- BookmarkModelFactory::GetForProfile(profile))),
- base::WrapUnique(new history::ContentVisitDelegate(profile))));
+ BookmarkModelFactory::GetForBrowserContext(context))),
+ base::WrapUnique(new history::ContentVisitDelegate(context))));
if (!history_service->Init(
- history::HistoryDatabaseParamsForPath(profile->GetPath()))) {
+ history::HistoryDatabaseParamsForPath(context->GetPath()))) {
return nullptr;
}
return history_service.release();
« no previous file with comments | « chrome/browser/history/android/sqlite_cursor_unittest.cc ('k') | chrome/browser/importer/external_process_importer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698