This source file includes following definitions.
- GetForProfile
- GetInstance
- BuildServiceInstanceFor
- RegisterProfilePrefs
#include "chrome/browser/signin/account_reconcilor_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/chrome_signin_client_factory.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
AccountReconcilorFactory::AccountReconcilorFactory()
: BrowserContextKeyedServiceFactory(
"AccountReconcilor",
BrowserContextDependencyManager::GetInstance()) {
DependsOn(ChromeSigninClientFactory::GetInstance());
DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
DependsOn(SigninManagerFactory::GetInstance());
}
AccountReconcilorFactory::~AccountReconcilorFactory() {}
AccountReconcilor* AccountReconcilorFactory::GetForProfile(
Profile* profile) {
return static_cast<AccountReconcilor*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
AccountReconcilorFactory* AccountReconcilorFactory::GetInstance() {
return Singleton<AccountReconcilorFactory>::get();
}
KeyedService* AccountReconcilorFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Profile* profile = Profile::FromBrowserContext(context);
AccountReconcilor* reconcilor = new AccountReconcilor(
ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
SigninManagerFactory::GetForProfile(profile),
ChromeSigninClientFactory::GetForProfile(profile));
reconcilor->Initialize(true );
return reconcilor;
}
void AccountReconcilorFactory::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
}