OLD | NEW |
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 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class BrowserContext; | 13 class BrowserContext; |
14 } | 14 } |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 template <typename T> struct DefaultSingletonTraits; | 17 template <typename T> struct DefaultSingletonTraits; |
18 } | 18 } |
19 | 19 |
20 class EasyUnlockService; | 20 class EasyUnlockService; |
21 class Profile; | |
22 | 21 |
23 // Singleton factory that builds and owns all EasyUnlockService. | 22 // Singleton factory that builds and owns all EasyUnlockService. |
24 class EasyUnlockServiceFactory : public BrowserContextKeyedServiceFactory { | 23 class EasyUnlockServiceFactory : public BrowserContextKeyedServiceFactory { |
25 public: | 24 public: |
26 static EasyUnlockServiceFactory* GetInstance(); | 25 static EasyUnlockServiceFactory* GetInstance(); |
27 | 26 |
28 static EasyUnlockService* GetForBrowserContext( | 27 static EasyUnlockService* GetForBrowserContext( |
29 content::BrowserContext* browser_context); | 28 content::BrowserContext* browser_context); |
30 | 29 |
31 void set_app_path_for_testing(const base::FilePath& app_path) { | 30 void set_app_path_for_testing(const base::FilePath& app_path) { |
(...skipping 13 matching lines...) Expand all Loading... |
45 content::BrowserContext* context) const override; | 44 content::BrowserContext* context) const override; |
46 bool ServiceIsCreatedWithBrowserContext() const override; | 45 bool ServiceIsCreatedWithBrowserContext() const override; |
47 bool ServiceIsNULLWhileTesting() const override; | 46 bool ServiceIsNULLWhileTesting() const override; |
48 | 47 |
49 base::FilePath app_path_for_testing_; | 48 base::FilePath app_path_for_testing_; |
50 | 49 |
51 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceFactory); | 50 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceFactory); |
52 }; | 51 }; |
53 | 52 |
54 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_ | 53 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_ |
OLD | NEW |