blob: 22b198d444f4d35b72b9c341d66089e0932285b4 [file] [log] [blame]
reillyg22114a382014-11-03 16:47:571// 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
5#ifndef EXTENSIONS_BROWSER_WARNING_SERVICE_FACTORY_H_
6#define EXTENSIONS_BROWSER_WARNING_SERVICE_FACTORY_H_
7
avic9cec102015-12-23 00:39:268#include "base/macros.h"
reillyg22114a382014-11-03 16:47:579#include "base/memory/singleton.h"
10#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11
12namespace extensions {
13
14class WarningService;
15
16class WarningServiceFactory : public BrowserContextKeyedServiceFactory {
17 public:
18 static WarningService* GetForBrowserContext(content::BrowserContext* context);
19 static WarningServiceFactory* GetInstance();
20
21 private:
olli.raula36aa8be2015-09-10 11:14:2222 friend struct base::DefaultSingletonTraits<WarningServiceFactory>;
reillyg22114a382014-11-03 16:47:5723
24 WarningServiceFactory();
25 ~WarningServiceFactory() override;
26
27 // BrowserContextKeyedServiceFactory implementation
28 KeyedService* BuildServiceInstanceFor(
29 content::BrowserContext* context) const override;
30 content::BrowserContext* GetBrowserContextToUse(
31 content::BrowserContext* context) const override;
32
33 DISALLOW_COPY_AND_ASSIGN(WarningServiceFactory);
34};
35
36} // namespace extensions
37
38#endif // EXTENSIONS_BROWSER_WARNING_SERVICE_FACTORY_H_