Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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_proximity_auth_client_factory.h" | |
| 6 | |
| 7 #include "chrome/browser/profiles/profile.h" | |
| 8 #include "chrome/browser/signin/chrome_proximity_auth_client.h" | |
| 9 #include "components/keyed_service/content/browser_context_dependency_manager.h" | |
| 10 | |
| 11 // static | |
| 12 ChromeProximityAuthClientFactory* | |
| 13 ChromeProximityAuthClientFactory::GetInstance() { | |
| 14 return Singleton<ChromeProximityAuthClientFactory>::get(); | |
| 15 } | |
| 16 | |
| 17 // static | |
| 18 ChromeProximityAuthClient* ChromeProximityAuthClientFactory::GetForProfile( | |
| 19 Profile* profile) { | |
| 20 return static_cast<ChromeProximityAuthClient*>( | |
| 21 GetInstance()->GetServiceForBrowserContext(profile, true)); | |
| 22 } | |
| 23 | |
| 24 ChromeProximityAuthClientFactory::ChromeProximityAuthClientFactory() | |
| 25 : BrowserContextKeyedServiceFactory( | |
| 26 "ChromeProximityAuthClient", | |
| 27 BrowserContextDependencyManager::GetInstance()) { | |
| 28 } | |
|
Mike Lerman
2015/06/26 13:09:51
DependsOn(SigninManagerFactory)?
Ilya Sherman
2015/06/27 08:18:00
Acknowledged. I think it actually wouldn't have b
| |
| 29 | |
| 30 ChromeProximityAuthClientFactory::~ChromeProximityAuthClientFactory() { | |
| 31 } | |
| 32 | |
| 33 KeyedService* ChromeProximityAuthClientFactory::BuildServiceInstanceFor( | |
| 34 content::BrowserContext* context) const { | |
| 35 return new ChromeProximityAuthClient(Profile::FromBrowserContext(context)); | |
| 36 } | |
| OLD | NEW |