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"
15 namespace extensions
{
16 class SettingsPrivateDelegate
;
18 // BrowserContextKeyedServiceFactory for each SettingsPrivateDelegate.
19 class SettingsPrivateDelegateFactory
20 : public BrowserContextKeyedServiceFactory
{
22 static SettingsPrivateDelegate
* GetForBrowserContext(
23 content::BrowserContext
* browser_context
);
25 static SettingsPrivateDelegateFactory
* GetInstance();
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__