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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
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 template <typename T> struct DefaultSingletonTraits; 17 template <typename T> struct DefaultSingletonTraits;
18 }
19
17 class EasyUnlockService; 20 class EasyUnlockService;
18 class Profile; 21 class Profile;
19 22
20 // Singleton factory that builds and owns all EasyUnlockService. 23 // Singleton factory that builds and owns all EasyUnlockService.
21 class EasyUnlockServiceFactory : public BrowserContextKeyedServiceFactory { 24 class EasyUnlockServiceFactory : public BrowserContextKeyedServiceFactory {
22 public: 25 public:
23 static EasyUnlockServiceFactory* GetInstance(); 26 static EasyUnlockServiceFactory* GetInstance();
24 27
25 static EasyUnlockService* GetForBrowserContext( 28 static EasyUnlockService* GetForBrowserContext(
26 content::BrowserContext* browser_context); 29 content::BrowserContext* browser_context);
27 30
28 void set_app_path_for_testing(const base::FilePath& app_path) { 31 void set_app_path_for_testing(const base::FilePath& app_path) {
29 app_path_for_testing_ = app_path; 32 app_path_for_testing_ = app_path;
30 } 33 }
31 34
32 private: 35 private:
33 friend struct DefaultSingletonTraits<EasyUnlockServiceFactory>; 36 friend struct base::DefaultSingletonTraits<EasyUnlockServiceFactory>;
34 37
35 EasyUnlockServiceFactory(); 38 EasyUnlockServiceFactory();
36 ~EasyUnlockServiceFactory() override; 39 ~EasyUnlockServiceFactory() override;
37 40
38 // BrowserContextKeyedServiceFactory: 41 // BrowserContextKeyedServiceFactory:
39 KeyedService* BuildServiceInstanceFor( 42 KeyedService* BuildServiceInstanceFor(
40 content::BrowserContext* context) const override; 43 content::BrowserContext* context) const override;
41 content::BrowserContext* GetBrowserContextToUse( 44 content::BrowserContext* GetBrowserContextToUse(
42 content::BrowserContext* context) const override; 45 content::BrowserContext* context) const override;
43 bool ServiceIsCreatedWithBrowserContext() const override; 46 bool ServiceIsCreatedWithBrowserContext() const override;
44 bool ServiceIsNULLWhileTesting() const override; 47 bool ServiceIsNULLWhileTesting() const override;
45 48
46 base::FilePath app_path_for_testing_; 49 base::FilePath app_path_for_testing_;
47 50
48 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceFactory); 51 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceFactory);
49 }; 52 };
50 53
51 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_ 54 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/cross_device_promo_factory.cc ('k') | chrome/browser/signin/easy_unlock_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698