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.
5 #ifndef CHROME_BROWSER_FAVICON_CHROME_FALLBACK_ICON_CLIENT_FACTORY_H_
6 #define CHROME_BROWSER_FAVICON_CHROME_FALLBACK_ICON_CLIENT_FACTORY_H_
8 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
10 template <typename T
> struct DefaultSingletonTraits
;
17 class FallbackIconClient
;
20 // Singleton that owns all ChromeFallbackIconClients and associates them with
22 class ChromeFallbackIconClientFactory
23 : public BrowserContextKeyedServiceFactory
{
25 // Returns the instance of FallbackIconClient associated with this profile
26 // (creating one if none exists).
27 static favicon::FallbackIconClient
* GetForBrowserContext(
28 content::BrowserContext
* context
);
30 // Returns an instance of the factory singleton.
31 static ChromeFallbackIconClientFactory
* GetInstance();
34 friend struct DefaultSingletonTraits
<ChromeFallbackIconClientFactory
>;
36 ChromeFallbackIconClientFactory();
37 ~ChromeFallbackIconClientFactory() override
;
39 // BrowserContextKeyedServiceFactory:
40 KeyedService
* BuildServiceInstanceFor(
41 content::BrowserContext
* context
) const override
;
44 #endif // CHROME_BROWSER_FAVICON_CHROME_FALLBACK_ICON_CLIENT_FACTORY_H_