1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/signin/chrome_signin_client_factory.h"
7 #include "chrome/browser/profiles/profile.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 ChromeSigninClientFactory::ChromeSigninClientFactory()
11 : BrowserContextKeyedServiceFactory(
13 BrowserContextDependencyManager::GetInstance()) {}
15 ChromeSigninClientFactory::~ChromeSigninClientFactory() {}
18 SigninClient
* ChromeSigninClientFactory::GetForProfile(Profile
* profile
) {
19 return static_cast<SigninClient
*>(
20 GetInstance()->GetServiceForBrowserContext(profile
, true));
24 ChromeSigninClientFactory
* ChromeSigninClientFactory::GetInstance() {
25 return Singleton
<ChromeSigninClientFactory
>::get();
28 KeyedService
* ChromeSigninClientFactory::BuildServiceInstanceFor(
29 content::BrowserContext
* context
) const {
30 ChromeSigninClient
* client
=
31 new ChromeSigninClient(static_cast<Profile
*>(context
));