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_EXTENSIONS_EXTENSION_WARNING_BADGE_SERVICE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_BADGE_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
10 | 10 |
11 namespace extensions { | 11 namespace extensions { |
12 | 12 |
13 class WarningBadgeService; | 13 class WarningBadgeService; |
14 | 14 |
15 class WarningBadgeServiceFactory : public BrowserContextKeyedServiceFactory { | 15 class WarningBadgeServiceFactory : public BrowserContextKeyedServiceFactory { |
16 public: | 16 public: |
17 static WarningBadgeService* GetForBrowserContext( | 17 static WarningBadgeService* GetForBrowserContext( |
18 content::BrowserContext* context); | 18 content::BrowserContext* context); |
19 static WarningBadgeServiceFactory* GetInstance(); | 19 static WarningBadgeServiceFactory* GetInstance(); |
20 | 20 |
21 private: | 21 private: |
22 friend struct DefaultSingletonTraits<WarningBadgeServiceFactory>; | 22 friend struct base::DefaultSingletonTraits<WarningBadgeServiceFactory>; |
23 | 23 |
24 WarningBadgeServiceFactory(); | 24 WarningBadgeServiceFactory(); |
25 ~WarningBadgeServiceFactory() override; | 25 ~WarningBadgeServiceFactory() override; |
26 | 26 |
27 // BrowserContextKeyedServiceFactory implementation | 27 // BrowserContextKeyedServiceFactory implementation |
28 KeyedService* BuildServiceInstanceFor( | 28 KeyedService* BuildServiceInstanceFor( |
29 content::BrowserContext* context) const override; | 29 content::BrowserContext* context) const override; |
30 content::BrowserContext* GetBrowserContextToUse( | 30 content::BrowserContext* GetBrowserContextToUse( |
31 content::BrowserContext* context) const override; | 31 content::BrowserContext* context) const override; |
32 bool ServiceIsCreatedWithBrowserContext() const override; | 32 bool ServiceIsCreatedWithBrowserContext() const override; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(WarningBadgeServiceFactory); | 34 DISALLOW_COPY_AND_ASSIGN(WarningBadgeServiceFactory); |
35 }; | 35 }; |
36 | 36 |
37 } // namespace extensions | 37 } // namespace extensions |
38 | 38 |
39 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_BADGE_SERVICE_FACTORY_H_ | 39 #endif // CHROME_BROWSER_EXTENSIONS_WARNING_BADGE_SERVICE_FACTORY_H_ |
OLD | NEW |