| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 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_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | |
| 10 | |
| 11 namespace base { | |
| 12 template <typename T> struct DefaultSingletonTraits; | |
| 13 } | |
| 14 | |
| 15 namespace content { | |
| 16 class BrowserContext; | |
| 17 } | |
| 18 | |
| 19 namespace favicon { | |
| 20 class FallbackIconService; | |
| 21 } | |
| 22 | |
| 23 // Singleton that owns all FallbackIconService and associates them with | |
| 24 // BrowserContext instances. | |
| 25 class FallbackIconServiceFactory : public BrowserContextKeyedServiceFactory { | |
| 26 public: | |
| 27 static favicon::FallbackIconService* GetForBrowserContext( | |
| 28 content::BrowserContext* context); | |
| 29 | |
| 30 static FallbackIconServiceFactory* GetInstance(); | |
| 31 | |
| 32 private: | |
| 33 friend struct base::DefaultSingletonTraits<FallbackIconServiceFactory>; | |
| 34 | |
| 35 FallbackIconServiceFactory(); | |
| 36 ~FallbackIconServiceFactory() override; | |
| 37 | |
| 38 // BrowserContextKeyedServiceFactory: | |
| 39 content::BrowserContext* GetBrowserContextToUse( | |
| 40 content::BrowserContext* context) const override; | |
| 41 KeyedService* BuildServiceInstanceFor( | |
| 42 content::BrowserContext* context) const override; | |
| 43 bool ServiceIsNULLWhileTesting() const override; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(FallbackIconServiceFactory); | |
| 46 }; | |
| 47 | |
| 48 #endif // CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ | |
| OLD | NEW |