Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / networking_private / networking_private_service_client_factory.h
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.
4
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_
7
8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
10
11 namespace context {
12 class BrowserContext;
13 }
14
15 namespace extensions {
16
17 class NetworkingPrivateServiceClient;
18
19 class NetworkingPrivateServiceClientFactory
20     : public BrowserContextKeyedServiceFactory {
21  public:
22   static NetworkingPrivateServiceClient* GetForBrowserContext(
23       content::BrowserContext* browser_context);
24
25   static NetworkingPrivateServiceClientFactory* GetInstance();
26
27  private:
28   friend struct DefaultSingletonTraits<NetworkingPrivateServiceClientFactory>;
29
30   NetworkingPrivateServiceClientFactory();
31   ~NetworkingPrivateServiceClientFactory() override;
32
33   // BrowserContextKeyedServiceFactory:
34   KeyedService* BuildServiceInstanceFor(
35       content::BrowserContext* browser_context) const override;
36   bool ServiceIsCreatedWithBrowserContext() const override;
37   bool ServiceIsNULLWhileTesting() const override;
38
39   DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateServiceClientFactory);
40 };
41
42 }  // namespace extensions
43
44 #endif  // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_SERVICE_CLIENT_FACTORY_H_