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

Unified Diff: chrome/browser/search_engines/template_url_service_factory.cc

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots 2 Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search_engines/template_url_service_factory.cc
diff --git a/chrome/browser/search_engines/template_url_service_factory.cc b/chrome/browser/search_engines/template_url_service_factory.cc
index 561fefb2230e0cf0e6b7c0a04ca85bc83bbf6227..bc6fb3f20e9d8dec9320ca3a13751742d78b3cf4 100644
--- a/chrome/browser/search_engines/template_url_service_factory.cc
+++ b/chrome/browser/search_engines/template_url_service_factory.cc
@@ -26,8 +26,8 @@ TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() {
// static
ProfileKeyedService* TemplateURLServiceFactory::BuildInstanceFor(
- Profile* profile) {
- return new TemplateURLService(profile);
+ content::BrowserContext* profile) {
+ return new TemplateURLService(static_cast<Profile*>(profile));
}
TemplateURLServiceFactory::TemplateURLServiceFactory()
@@ -41,8 +41,8 @@ TemplateURLServiceFactory::TemplateURLServiceFactory()
TemplateURLServiceFactory::~TemplateURLServiceFactory() {}
ProfileKeyedService* TemplateURLServiceFactory::BuildServiceInstanceFor(
- Profile* profile) const {
- return BuildInstanceFor(profile);
+ content::BrowserContext* profile) const {
+ return BuildInstanceFor(static_cast<Profile*>(profile));
}
void TemplateURLServiceFactory::RegisterUserPrefs(
@@ -96,7 +96,8 @@ bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
-void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) {
+void TemplateURLServiceFactory::ProfileShutdown(
+ content::BrowserContext* profile) {
// We shutdown AND destroy the TemplateURLService during this pass.
// TemplateURLService schedules a task on the WebDataService from its
// destructor. Delete it first to ensure the task gets scheduled before we
@@ -105,6 +106,7 @@ void TemplateURLServiceFactory::ProfileShutdown(Profile* profile) {
ProfileKeyedServiceFactory::ProfileDestroyed(profile);
}
-void TemplateURLServiceFactory::ProfileDestroyed(Profile* profile) {
+void TemplateURLServiceFactory::ProfileDestroyed(
+ content::BrowserContext* profile) {
// Don't double delete.
}

Powered by Google App Engine
This is Rietveld 408576698