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

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

Issue 870143004: HistoryService::Init() receives the list of languages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-history-service
Patch Set: Rebase 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
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 87a406afa3e0275cc2b2a7a707aff295bd2e59c2..1c39d82fc1d58daa0dc4c05cd6b9f64e2ad5347f 100644
--- a/chrome/browser/history/history_service_factory.cc
+++ b/chrome/browser/history/history_service_factory.cc
@@ -75,10 +75,11 @@ HistoryServiceFactory::~HistoryServiceFactory() {
KeyedService* HistoryServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- Profile* profile = static_cast<Profile*>(context);
+ Profile* profile = Profile::FromBrowserContext(context);
scoped_ptr<HistoryService> history_service(new HistoryService(
ChromeHistoryClientFactory::GetForProfile(profile), profile));
if (!history_service->Init(
+ profile->GetPrefs()->GetString(prefs::kAcceptLanguages),
history::HistoryDatabaseParamsForPath(profile->GetPath()))) {
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698