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

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

Issue 1209193003: [Proximity Auth] Create one ProximityAuthClient per profile, rather than one global one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698