OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ |
7 | 7 |
8 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 8 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
9 | 9 |
| 10 namespace base { |
10 template <typename T> struct DefaultSingletonTraits; | 11 template <typename T> struct DefaultSingletonTraits; |
| 12 } |
11 | 13 |
12 namespace extensions { | 14 namespace extensions { |
13 | 15 |
14 class InstallTracker; | 16 class InstallTracker; |
15 | 17 |
16 class InstallTrackerFactory : public BrowserContextKeyedServiceFactory { | 18 class InstallTrackerFactory : public BrowserContextKeyedServiceFactory { |
17 public: | 19 public: |
18 static InstallTracker* GetForBrowserContext(content::BrowserContext* context); | 20 static InstallTracker* GetForBrowserContext(content::BrowserContext* context); |
19 static InstallTrackerFactory* GetInstance(); | 21 static InstallTrackerFactory* GetInstance(); |
20 | 22 |
21 private: | 23 private: |
22 friend struct DefaultSingletonTraits<InstallTrackerFactory>; | 24 friend struct base::DefaultSingletonTraits<InstallTrackerFactory>; |
23 | 25 |
24 InstallTrackerFactory(); | 26 InstallTrackerFactory(); |
25 ~InstallTrackerFactory() override; | 27 ~InstallTrackerFactory() override; |
26 | 28 |
27 // BrowserContextKeyedServiceFactory overrides: | 29 // BrowserContextKeyedServiceFactory overrides: |
28 KeyedService* BuildServiceInstanceFor( | 30 KeyedService* BuildServiceInstanceFor( |
29 content::BrowserContext* context) const override; | 31 content::BrowserContext* context) const override; |
30 content::BrowserContext* GetBrowserContextToUse( | 32 content::BrowserContext* GetBrowserContextToUse( |
31 content::BrowserContext* context) const override; | 33 content::BrowserContext* context) const override; |
32 | 34 |
33 DISALLOW_COPY_AND_ASSIGN(InstallTrackerFactory); | 35 DISALLOW_COPY_AND_ASSIGN(InstallTrackerFactory); |
34 }; | 36 }; |
35 | 37 |
36 } // namespace extensions | 38 } // namespace extensions |
37 | 39 |
38 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ | 40 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_FACTORY_H_ |
OLD | NEW |