Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / extensions / api / settings_private / settings_private_delegate_factory.h
blob199711a898941a0a593bf04046b024d1c9eeb2d9
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_EXTENSIONS_API_SETTINGS_PRIVATE_SETTINGS_PRIVATE_DELEGATE_FACTORY_H__
6 #define CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_SETTINGS_PRIVATE_DELEGATE_FACTORY_H__
8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11 namespace context {
12 class BrowserContext;
15 namespace extensions {
16 class SettingsPrivateDelegate;
18 // BrowserContextKeyedServiceFactory for each SettingsPrivateDelegate.
19 class SettingsPrivateDelegateFactory
20 : public BrowserContextKeyedServiceFactory {
21 public:
22 static SettingsPrivateDelegate* GetForBrowserContext(
23 content::BrowserContext* browser_context);
25 static SettingsPrivateDelegateFactory* GetInstance();
27 private:
28 friend struct base::DefaultSingletonTraits<SettingsPrivateDelegateFactory>;
30 SettingsPrivateDelegateFactory();
31 ~SettingsPrivateDelegateFactory() override;
33 // BrowserContextKeyedBaseFactory implementation.
34 KeyedService* BuildServiceInstanceFor(
35 content::BrowserContext* profile) const override;
37 DISALLOW_COPY_AND_ASSIGN(SettingsPrivateDelegateFactory);
40 } // namespace extensions
42 #endif // CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_SETTINGS_PRIVATE_DELEGATE_FACTORY_H__