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.
4 #ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_FACTORY_CHROMEOS_H_
5 #define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_FACTORY_CHROMEOS_H_
7 #include "base/memory/singleton.h"
8 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
14 namespace extensions {
16 class NetworkingPrivateChromeOS;
18 class NetworkingPrivateChromeOSFactory
19 : public BrowserContextKeyedServiceFactory {
21 static NetworkingPrivateChromeOS* GetForBrowserContext(
22 content::BrowserContext* browser_context);
23 static NetworkingPrivateChromeOSFactory* GetInstance();
26 friend struct DefaultSingletonTraits<NetworkingPrivateChromeOSFactory>;
28 NetworkingPrivateChromeOSFactory();
29 virtual ~NetworkingPrivateChromeOSFactory();
31 // BrowserContextKeyedServiceFactory:
32 virtual KeyedService* BuildServiceInstanceFor(
33 content::BrowserContext* browser_context) const OVERRIDE;
34 virtual content::BrowserContext* GetBrowserContextToUse(
35 content::BrowserContext* context) const OVERRIDE;
36 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
37 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
39 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateChromeOSFactory);
42 } // namespace extensions
44 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_FACTORY_CHROMEOS_H_