Index: chrome/browser/profiles/profile_keyed_service_factory.cc |
diff --git a/chrome/browser/profiles/profile_keyed_service_factory.cc b/chrome/browser/profiles/profile_keyed_service_factory.cc |
index d3ee4a547822849247be406f702d6cff646e780f..4cf221c3c8029a30146d9e77b10257a12378c061 100644 |
--- a/chrome/browser/profiles/profile_keyed_service_factory.cc |
+++ b/chrome/browser/profiles/profile_keyed_service_factory.cc |
@@ -12,7 +12,7 @@ |
#include "chrome/browser/profiles/profile_dependency_manager.h" |
#include "chrome/browser/profiles/profile_keyed_service.h" |
-void ProfileKeyedServiceFactory::SetTestingFactory(Profile* profile, |
+void ProfileKeyedServiceFactory::SetTestingFactory(content::BrowserContext* profile, |
FactoryFunction factory) { |
// Destroying the profile may cause us to lose data about whether |profile| |
// has our preferences registered on it (since the profile object itself |
@@ -33,7 +33,7 @@ void ProfileKeyedServiceFactory::SetTestingFactory(Profile* profile, |
} |
ProfileKeyedService* ProfileKeyedServiceFactory::SetTestingFactoryAndUse( |
- Profile* profile, |
+ content::BrowserContext* profile, |
FactoryFunction factory) { |
DCHECK(factory); |
SetTestingFactory(profile, factory); |
@@ -50,11 +50,12 @@ ProfileKeyedServiceFactory::~ProfileKeyedServiceFactory() { |
} |
ProfileKeyedService* ProfileKeyedServiceFactory::GetServiceForProfile( |
- Profile* profile, |
+ content::BrowserContext* profile, |
bool create) { |
- profile = GetProfileToUse(profile); |
- if (!profile) |
- return NULL; |
+ // TODO(phajdan.jr): Migrate this. |
+ //profile = GetProfileToUse(profile); |
+ //if (!profile) |
+ // return NULL; |
// NOTE: If you modify any of the logic below, make sure to update the |
// refcounted version in refcounted_profile_keyed_service_factory.cc! |
@@ -85,19 +86,19 @@ ProfileKeyedService* ProfileKeyedServiceFactory::GetServiceForProfile( |
return service; |
} |
-void ProfileKeyedServiceFactory::Associate(Profile* profile, |
+void ProfileKeyedServiceFactory::Associate(content::BrowserContext* profile, |
ProfileKeyedService* service) { |
DCHECK(!ContainsKey(mapping_, profile)); |
mapping_.insert(std::make_pair(profile, service)); |
} |
-void ProfileKeyedServiceFactory::ProfileShutdown(Profile* profile) { |
+void ProfileKeyedServiceFactory::ProfileShutdown(content::BrowserContext* profile) { |
ProfileKeyedServices::iterator it = mapping_.find(profile); |
if (it != mapping_.end() && it->second) |
it->second->Shutdown(); |
} |
-void ProfileKeyedServiceFactory::ProfileDestroyed(Profile* profile) { |
+void ProfileKeyedServiceFactory::ProfileDestroyed(content::BrowserContext* profile) { |
ProfileKeyedServices::iterator it = mapping_.find(profile); |
if (it != mapping_.end()) { |
delete it->second; |
@@ -114,10 +115,10 @@ void ProfileKeyedServiceFactory::ProfileDestroyed(Profile* profile) { |
} |
void ProfileKeyedServiceFactory::SetEmptyTestingFactory( |
- Profile* profile) { |
+ content::BrowserContext* profile) { |
SetTestingFactory(profile, NULL); |
} |
-void ProfileKeyedServiceFactory::CreateServiceNow(Profile* profile) { |
+void ProfileKeyedServiceFactory::CreateServiceNow(content::BrowserContext* profile) { |
GetServiceForProfile(profile, true); |
} |