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

Side by Side Diff: chrome/browser/history/history_service_factory.cc

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/history/history_service_factory.h" 5 #include "chrome/browser/history/history_service_factory.h"
6 6
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
8 #include "chrome/browser/history/chrome_history_client.h" 8 #include "chrome/browser/history/chrome_history_client.h"
9 #include "chrome/browser/profiles/incognito_helpers.h" 9 #include "chrome/browser/profiles/incognito_helpers.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 KeyedService* HistoryServiceFactory::BuildServiceInstanceFor( 77 KeyedService* HistoryServiceFactory::BuildServiceInstanceFor(
78 content::BrowserContext* context) const { 78 content::BrowserContext* context) const {
79 Profile* profile = Profile::FromBrowserContext(context); 79 Profile* profile = Profile::FromBrowserContext(context);
80 scoped_ptr<history::HistoryService> history_service( 80 scoped_ptr<history::HistoryService> history_service(
81 new history::HistoryService( 81 new history::HistoryService(
82 make_scoped_ptr(new ChromeHistoryClient( 82 make_scoped_ptr(new ChromeHistoryClient(
83 BookmarkModelFactory::GetForProfile(profile))), 83 BookmarkModelFactory::GetForProfile(profile))),
84 make_scoped_ptr(new history::ContentVisitDelegate(profile)))); 84 make_scoped_ptr(new history::ContentVisitDelegate(profile))));
85 if (!history_service->Init( 85 if (!history_service->Init(
86 profile->GetPrefs()->GetString(prefs::kAcceptLanguages),
87 history::HistoryDatabaseParamsForPath(profile->GetPath()))) { 86 history::HistoryDatabaseParamsForPath(profile->GetPath()))) {
88 return nullptr; 87 return nullptr;
89 } 88 }
90 return history_service.release(); 89 return history_service.release();
91 } 90 }
92 91
93 content::BrowserContext* HistoryServiceFactory::GetBrowserContextToUse( 92 content::BrowserContext* HistoryServiceFactory::GetBrowserContextToUse(
94 content::BrowserContext* context) const { 93 content::BrowserContext* context) const {
95 return chrome::GetBrowserContextRedirectedInIncognito(context); 94 return chrome::GetBrowserContextRedirectedInIncognito(context);
96 } 95 }
97 96
98 bool HistoryServiceFactory::ServiceIsNULLWhileTesting() const { 97 bool HistoryServiceFactory::ServiceIsNULLWhileTesting() const {
99 return true; 98 return true;
100 } 99 }
OLDNEW
« no previous file with comments | « chrome/browser/history/android/android_provider_backend_unittest.cc ('k') | chrome/browser/history/history_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698