Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / favicon / chrome_favicon_client_factory.h
blob83fdcc0ec43ec5e4b25a70b17ac301cc19921e2f
1 // Copyright 2014 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_FAVICON_CLIENT_FACTORY_H_
6 #define CHROME_BROWSER_FAVICON_CHROME_FAVICON_CLIENT_FACTORY_H_
8 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
10 template <typename T>
11 struct DefaultSingletonTraits;
13 class Profile;
15 namespace favicon {
16 class FaviconClient;
19 // Singleton that owns all ChromeFaviconClients and associates them with
20 // Profiles.
21 class ChromeFaviconClientFactory : public BrowserContextKeyedServiceFactory {
22 public:
23 // Returns the instance of favicon::FaviconClient associated with |profile|
24 // (creating one if none exists).
25 static favicon::FaviconClient* GetForProfile(Profile* profile);
27 // Returns an instance of the factory singleton.
28 static ChromeFaviconClientFactory* GetInstance();
30 private:
31 friend struct DefaultSingletonTraits<ChromeFaviconClientFactory>;
33 ChromeFaviconClientFactory();
34 ~ChromeFaviconClientFactory() override;
36 // BrowserContextKeyedServiceFactory:
37 KeyedService* BuildServiceInstanceFor(
38 content::BrowserContext* profile) const override;
39 content::BrowserContext* GetBrowserContextToUse(
40 content::BrowserContext* context) const override;
43 #endif // CHROME_BROWSER_FAVICON_CHROME_FAVICON_CLIENT_FACTORY_H_