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 #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_ | |
| OLD | NEW |