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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 dc66f38514fb1557ea9b848fe1b3fa70abb54303..3b1c8d78f6ab51b0b5419a00365229fd04f91256 100644
--- a/chrome/browser/search_engines/template_url_service_factory.cc
+++ b/chrome/browser/search_engines/template_url_service_factory.cc
@@ -17,7 +17,7 @@
// static
TemplateURLService* TemplateURLServiceFactory::GetForProfile(Profile* profile) {
return static_cast<TemplateURLService*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -26,14 +26,15 @@ TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() {
}
// static
-ProfileKeyedService* TemplateURLServiceFactory::BuildInstanceFor(
+BrowserContextKeyedService* TemplateURLServiceFactory::BuildInstanceFor(
content::BrowserContext* profile) {
return new TemplateURLService(static_cast<Profile*>(profile));
}
TemplateURLServiceFactory::TemplateURLServiceFactory()
- : ProfileKeyedServiceFactory("TemplateURLServiceFactory",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "TemplateURLServiceFactory",
+ BrowserContextDependencyManager::GetInstance()) {
DependsOn(GoogleURLTrackerFactory::GetInstance());
DependsOn(HistoryServiceFactory::GetInstance());
DependsOn(WebDataServiceFactory::GetInstance());
@@ -41,7 +42,7 @@ TemplateURLServiceFactory::TemplateURLServiceFactory()
TemplateURLServiceFactory::~TemplateURLServiceFactory() {}
-ProfileKeyedService* TemplateURLServiceFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService* TemplateURLServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
return BuildInstanceFor(static_cast<Profile*>(profile));
}
@@ -112,17 +113,17 @@ bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
-void TemplateURLServiceFactory::ProfileShutdown(
+void TemplateURLServiceFactory::BrowserContextShutdown(
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
// shut down the database.
- ProfileKeyedServiceFactory::ProfileShutdown(profile);
- ProfileKeyedServiceFactory::ProfileDestroyed(profile);
+ BrowserContextKeyedServiceFactory::BrowserContextShutdown(profile);
+ BrowserContextKeyedServiceFactory::BrowserContextDestroyed(profile);
}
-void TemplateURLServiceFactory::ProfileDestroyed(
+void TemplateURLServiceFactory::BrowserContextDestroyed(
content::BrowserContext* profile) {
// Don't double delete.
}

Powered by Google App Engine
This is Rietveld 408576698