Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / favicon / chrome_fallback_icon_client_factory.h
blob0f349a62b104d42b2deb694681601049571fdde1
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 namespace base {
11 template <typename T> struct DefaultSingletonTraits;
14 namespace content {
15 class BrowserContext;
18 namespace favicon {
19 class FallbackIconClient;
22 // Singleton that owns all ChromeFallbackIconClients and associates them with
23 // Profiles.
24 class ChromeFallbackIconClientFactory
25 : public BrowserContextKeyedServiceFactory {
26 public:
27 // Returns the instance of FallbackIconClient associated with this profile
28 // (creating one if none exists).
29 static favicon::FallbackIconClient* GetForBrowserContext(
30 content::BrowserContext* context);
32 // Returns an instance of the factory singleton.
33 static ChromeFallbackIconClientFactory* GetInstance();
35 private:
36 friend struct base::DefaultSingletonTraits<ChromeFallbackIconClientFactory>;
38 ChromeFallbackIconClientFactory();
39 ~ChromeFallbackIconClientFactory() override;
41 // BrowserContextKeyedServiceFactory:
42 KeyedService* BuildServiceInstanceFor(
43 content::BrowserContext* context) const override;
46 #endif // CHROME_BROWSER_FAVICON_CHROME_FALLBACK_ICON_CLIENT_FACTORY_H_