Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / signin / easy_unlock_service_factory.h
blobab5bf18bd03f624078b8b8c004b928465712becd
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_
8 #include "base/files/file_path.h"
9 #include "base/macros.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
12 namespace content {
13 class BrowserContext;
16 template <typename T> struct DefaultSingletonTraits;
17 class EasyUnlockService;
18 class Profile;
20 // Singleton factory that builds and owns all EasyUnlockService.
21 class EasyUnlockServiceFactory : public BrowserContextKeyedServiceFactory {
22 public:
23 static EasyUnlockServiceFactory* GetInstance();
25 static EasyUnlockService* GetForBrowserContext(
26 content::BrowserContext* browser_context);
28 void set_app_path_for_testing(const base::FilePath& app_path) {
29 app_path_for_testing_ = app_path;
32 private:
33 friend struct DefaultSingletonTraits<EasyUnlockServiceFactory>;
35 EasyUnlockServiceFactory();
36 ~EasyUnlockServiceFactory() override;
38 // BrowserContextKeyedServiceFactory:
39 KeyedService* BuildServiceInstanceFor(
40 content::BrowserContext* context) const override;
41 content::BrowserContext* GetBrowserContextToUse(
42 content::BrowserContext* context) const override;
43 bool ServiceIsCreatedWithBrowserContext() const override;
44 bool ServiceIsNULLWhileTesting() const override;
46 base::FilePath app_path_for_testing_;
48 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceFactory);
51 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_