This source file includes following definitions.
- BuildFakeProfileOAuth2TokenService
- BuildAutoIssuingFakeProfileOAuth2TokenService
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/chrome_signin_client_factory.h"
#include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
#include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
KeyedService* BuildFakeProfileOAuth2TokenService(
content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
FakeProfileOAuth2TokenService* service = new FakeProfileOAuth2TokenService();
service->Initialize(
ChromeSigninClientFactory::GetInstance()->GetForProfile(profile));
return service;
}
KeyedService* BuildAutoIssuingFakeProfileOAuth2TokenService(
content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
FakeProfileOAuth2TokenService* service = new FakeProfileOAuth2TokenService();
service->set_auto_post_fetch_response_on_message_loop(true);
service->Initialize(
ChromeSigninClientFactory::GetInstance()->GetForProfile(profile));
return service;
}