This source file includes following definitions.
- GetForProfile
- GetInstance
- BuildServiceInstanceFor
#include "chrome/browser/signin/chrome_signin_client_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
ChromeSigninClientFactory::ChromeSigninClientFactory()
: BrowserContextKeyedServiceFactory(
"ChromeSigninClient",
BrowserContextDependencyManager::GetInstance()) {}
ChromeSigninClientFactory::~ChromeSigninClientFactory() {}
ChromeSigninClient* ChromeSigninClientFactory::GetForProfile(Profile* profile) {
return static_cast<ChromeSigninClient*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
ChromeSigninClientFactory* ChromeSigninClientFactory::GetInstance() {
return Singleton<ChromeSigninClientFactory>::get();
}
KeyedService* ChromeSigninClientFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
ChromeSigninClient* client =
new ChromeSigninClient(static_cast<Profile*>(context));
return client;
}