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

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

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 #ifndef CHROME_BROWSER_SIGNIN_CHROME_PROXIMITY_AUTH_CLIENT_FACTORY_H_
6 #define CHROME_BROWSER_SIGNIN_CHROME_PROXIMITY_AUTH_CLIENT_FACTORY_H_
7
8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
10
11 class ChromeProximityAuthClient;
12 class KeyedService;
13 class Profile;
14
15 namespace content {
16 class BrowserContext;
17 }
18
19 // Singleton that owns all |ChromeProximityAuthClient| instances and associates
20 // them with profiles. Listens for each profile's destruction notification and
Mike Lerman 2015/06/26 13:09:51 I don't see where you react to the Profile destruc
Ilya Sherman 2015/06/27 08:18:00 Whoops, you can see which class I copy/pasta'd :P
21 // cleans up the associated SigninManager.
22 class ChromeProximityAuthClientFactory
23 : public BrowserContextKeyedServiceFactory {
24 public:
25 // Returns an instance of the |ChromeProximityAuthClientFactory| singleton.
26 static ChromeProximityAuthClientFactory* GetInstance();
27
28 // Returns the |ChromeProximityAuthClient| for the given |profile|, creating
29 // it if necessary.
30 static ChromeProximityAuthClient* GetForProfile(Profile* profile);
31
32 private:
33 friend struct DefaultSingletonTraits<ChromeProximityAuthClientFactory>;
34
35 ChromeProximityAuthClientFactory();
36 ~ChromeProximityAuthClientFactory() override;
37
38 // BrowserContextKeyedServiceFactory:
39 KeyedService* BuildServiceInstanceFor(
40 content::BrowserContext* context) const override;
41 };
42
43 #endif // CHROME_BROWSER_SIGNIN_CHROME_PROXIMITY_AUTH_CLIENT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698