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

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

Issue 276463002: non-new-profile-management creates a "no-op" style account_reconcilor, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TestSigninClient for AccountReconcilorTests Created 6 years, 6 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/chrome_signin_client_factory.h" 5 #include "chrome/browser/signin/chrome_signin_client_factory.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h" 8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "components/signin/core/browser/test_signin_client.h"
Roger Tawa OOO till Jul 10th 2014/05/27 19:15:38 Is this include needed here?
Mike Lerman 2014/05/27 19:43:03 Done.
9 10
10 ChromeSigninClientFactory::ChromeSigninClientFactory() 11 ChromeSigninClientFactory::ChromeSigninClientFactory()
11 : BrowserContextKeyedServiceFactory( 12 : BrowserContextKeyedServiceFactory(
12 "ChromeSigninClient", 13 "ChromeSigninClient",
13 BrowserContextDependencyManager::GetInstance()) {} 14 BrowserContextDependencyManager::GetInstance()) {}
14 15
15 ChromeSigninClientFactory::~ChromeSigninClientFactory() {} 16 ChromeSigninClientFactory::~ChromeSigninClientFactory() {}
16 17
17 // static 18 // static
18 SigninClient* ChromeSigninClientFactory::GetForProfile(Profile* profile) { 19 SigninClient* ChromeSigninClientFactory::GetForProfile(Profile* profile) {
19 return static_cast<SigninClient*>( 20 return static_cast<SigninClient*>(
20 GetInstance()->GetServiceForBrowserContext(profile, true)); 21 GetInstance()->GetServiceForBrowserContext(profile, true));
21 } 22 }
22 23
23 // static 24 // static
24 ChromeSigninClientFactory* ChromeSigninClientFactory::GetInstance() { 25 ChromeSigninClientFactory* ChromeSigninClientFactory::GetInstance() {
25 return Singleton<ChromeSigninClientFactory>::get(); 26 return Singleton<ChromeSigninClientFactory>::get();
26 } 27 }
27 28
28 KeyedService* ChromeSigninClientFactory::BuildServiceInstanceFor( 29 KeyedService* ChromeSigninClientFactory::BuildServiceInstanceFor(
29 content::BrowserContext* context) const { 30 content::BrowserContext* context) const {
30 ChromeSigninClient* client = 31 ChromeSigninClient* client =
31 new ChromeSigninClient(static_cast<Profile*>(context)); 32 new ChromeSigninClient(static_cast<Profile*>(context));
32 return client; 33 return client;
33 } 34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698