1 // Copyright 2013 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_NETWORKING_PRIVATE_NETWORKING_PRIVATE_SERVICE_CLIENT_FACTORY_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_SERVICE_CLIENT_FACTORY_H_
8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
15 namespace extensions {
17 class NetworkingPrivateServiceClient;
19 class NetworkingPrivateServiceClientFactory
20 : public BrowserContextKeyedServiceFactory {
22 static NetworkingPrivateServiceClient* GetForBrowserContext(
23 content::BrowserContext* browser_context);
25 static NetworkingPrivateServiceClientFactory* GetInstance();
28 friend struct DefaultSingletonTraits<NetworkingPrivateServiceClientFactory>;
30 NetworkingPrivateServiceClientFactory();
31 virtual ~NetworkingPrivateServiceClientFactory();
33 // BrowserContextKeyedServiceFactory:
34 virtual KeyedService* BuildServiceInstanceFor(
35 content::BrowserContext* browser_context) const OVERRIDE;
36 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
37 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
39 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateServiceClientFactory);
42 } // namespace extensions
44 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_SERVICE_CLIENT_FACTORY_H_