Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / favicon / chrome_fallback_icon_client_factory.h
blob84c0ebf99d289e2b1c67c0dd80aab622932d5313
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;
12 namespace content {
13 class BrowserContext;
16 namespace favicon {
17 class FallbackIconClient;
20 // Singleton that owns all ChromeFallbackIconClients and associates them with
21 // Profiles.
22 class ChromeFallbackIconClientFactory
23 : public BrowserContextKeyedServiceFactory {
24 public:
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();
33 private:
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_