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

Unified Diff: chrome/browser/sessions/session_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/sessions/session_service_factory.cc
diff --git a/chrome/browser/sessions/session_service_factory.cc b/chrome/browser/sessions/session_service_factory.cc
index 3cbd0fbddd094cab825d241e88f73773ea972055..05cf1989899cdad0688c324f4be690b59bd4ca9d 100644
--- a/chrome/browser/sessions/session_service_factory.cc
+++ b/chrome/browser/sessions/session_service_factory.cc
@@ -15,7 +15,7 @@ SessionService* SessionServiceFactory::GetForProfile(Profile* profile) {
return NULL;
#else
return static_cast<SessionService*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
#endif
}
@@ -27,7 +27,7 @@ SessionService* SessionServiceFactory::GetForProfileIfExisting(
return NULL;
#else
return static_cast<SessionService*>(
- GetInstance()->GetServiceForProfile(profile, false));
+ GetInstance()->GetServiceForBrowserContext(profile, false));
#endif
}
@@ -37,12 +37,12 @@ void SessionServiceFactory::ShutdownForProfile(Profile* profile) {
// been created yet. We do this to ensure session state matches the point in
// time the user exited.
SessionServiceFactory* factory = GetInstance();
- factory->GetServiceForProfile(profile, true);
+ factory->GetServiceForBrowserContext(profile, true);
// Shut down and remove the reference to the session service, and replace it
// with an explicit NULL to prevent it being recreated on the next access.
- factory->ProfileShutdown(profile);
- factory->ProfileDestroyed(profile);
+ factory->BrowserContextShutdown(profile);
+ factory->BrowserContextDestroyed(profile);
factory->Associate(profile, NULL);
}
@@ -51,14 +51,15 @@ SessionServiceFactory* SessionServiceFactory::GetInstance() {
}
SessionServiceFactory::SessionServiceFactory()
- : ProfileKeyedServiceFactory("SessionService",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "SessionService",
+ BrowserContextDependencyManager::GetInstance()) {
}
SessionServiceFactory::~SessionServiceFactory() {
}
-ProfileKeyedService* SessionServiceFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService* SessionServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
SessionService* service = NULL;
service = new SessionService(static_cast<Profile*>(profile));
@@ -66,7 +67,7 @@ ProfileKeyedService* SessionServiceFactory::BuildServiceInstanceFor(
return service;
}
-bool SessionServiceFactory::ServiceIsCreatedWithProfile() const {
+bool SessionServiceFactory::ServiceIsCreatedWithBrowserContext() const {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698