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
11namespace context {
12class BrowserContext;
13}
14
15namespace extensions {
16
17class NetworkingPrivateServiceClient;
18
19class 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  virtual ~NetworkingPrivateServiceClientFactory();
32
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;
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_
45