OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_APP_ICON_SERVICE_FACTORY_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_APP_ICON_SERVICE_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 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 ExtensionAppIconService; |
| 15 |
| 16 // Factory to create ExtensionAppIconService. Use helper |
| 17 // ExtensionAppIconService::Get(context) to access the service. |
| 18 class ExtensionAppIconServiceFactory |
| 19 : public BrowserContextKeyedServiceFactory { |
| 20 public: |
| 21 static ExtensionAppIconService* GetForBrowserContext( |
| 22 content::BrowserContext* context); |
| 23 |
| 24 static ExtensionAppIconServiceFactory* GetInstance(); |
| 25 |
| 26 private: |
| 27 friend struct base::DefaultSingletonTraits<ExtensionAppIconServiceFactory>; |
| 28 |
| 29 ExtensionAppIconServiceFactory(); |
| 30 ~ExtensionAppIconServiceFactory() override; |
| 31 |
| 32 KeyedService* BuildServiceInstanceFor( |
| 33 content::BrowserContext* context) const override; |
| 34 content::BrowserContext* GetBrowserContextToUse( |
| 35 content::BrowserContext* context) const override; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(ExtensionAppIconServiceFactory); |
| 38 }; |
| 39 |
| 40 } // namespace extensions |
| 41 |
| 42 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APP_ICON_SERVICE_FACTORY_H_ |
OLD | NEW |