reillyg | 22114a38 | 2014-11-03 16:47:57 | [diff] [blame] | 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. |
| 4 | |
| 5 | #ifndef EXTENSIONS_BROWSER_WARNING_SERVICE_FACTORY_H_ |
| 6 | #define EXTENSIONS_BROWSER_WARNING_SERVICE_FACTORY_H_ |
| 7 | |
avi | c9cec10 | 2015-12-23 00:39:26 | [diff] [blame] | 8 | #include "base/macros.h" |
reillyg | 22114a38 | 2014-11-03 16:47:57 | [diff] [blame] | 9 | #include "base/memory/singleton.h" |
| 10 | #include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
| 11 | |
| 12 | namespace extensions { |
| 13 | |
| 14 | class WarningService; |
| 15 | |
| 16 | class WarningServiceFactory : public BrowserContextKeyedServiceFactory { |
| 17 | public: |
| 18 | static WarningService* GetForBrowserContext(content::BrowserContext* context); |
| 19 | static WarningServiceFactory* GetInstance(); |
| 20 | |
| 21 | private: |
olli.raula | 36aa8be | 2015-09-10 11:14:22 | [diff] [blame] | 22 | friend struct base::DefaultSingletonTraits<WarningServiceFactory>; |
reillyg | 22114a38 | 2014-11-03 16:47:57 | [diff] [blame] | 23 | |
| 24 | WarningServiceFactory(); |
| 25 | ~WarningServiceFactory() override; |
| 26 | |
| 27 | // BrowserContextKeyedServiceFactory implementation |
| 28 | KeyedService* BuildServiceInstanceFor( |
| 29 | content::BrowserContext* context) const override; |
| 30 | content::BrowserContext* GetBrowserContextToUse( |
| 31 | content::BrowserContext* context) const override; |
| 32 | |
| 33 | DISALLOW_COPY_AND_ASSIGN(WarningServiceFactory); |
| 34 | }; |
| 35 | |
| 36 | } // namespace extensions |
| 37 | |
| 38 | #endif // EXTENSIONS_BROWSER_WARNING_SERVICE_FACTORY_H_ |