Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: chrome/browser/signin/chrome_signin_client_factory.cc

Issue 192313002: Make ChromeSigninClient a BrowserContextKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/signin/chrome_signin_client_factory.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h"
9
10 ChromeSigninClientFactory::ChromeSigninClientFactory()
11 : BrowserContextKeyedServiceFactory(
12 "ChromeSigninClient",
13 BrowserContextDependencyManager::GetInstance()) {}
14
15 ChromeSigninClientFactory::~ChromeSigninClientFactory() {}
16
17 // static
18 ChromeSigninClient* ChromeSigninClientFactory::GetForProfile(Profile* profile) {
19 return static_cast<ChromeSigninClient*>(
20 GetInstance()->GetServiceForBrowserContext(profile, true));
21 }
22
23 // static
24 ChromeSigninClientFactory* ChromeSigninClientFactory::GetInstance() {
25 return Singleton<ChromeSigninClientFactory>::get();
26 }
27
28 BrowserContextKeyedService* ChromeSigninClientFactory::BuildServiceInstanceFor(
29 content::BrowserContext* context) const {
30 ChromeSigninClient* client =
31 new ChromeSigninClient(static_cast<Profile*>(context));
32 return client;
33 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_client_factory.h ('k') | chrome/browser/signin/fake_signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698