Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / net / spdyproxy / data_reduction_proxy_chrome_settings_factory.h
bloba4a22bf496de74cce818eb10052ef43de636bc4d
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.
5 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_FACTORY_H_
6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_FACTORY_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
12 class DataReductionProxyChromeSettings;
14 // Constucts a DataReductionProxySettings object suitable for use with a
15 // Chrome browser.
16 class DataReductionProxyChromeSettingsFactory
17 : public BrowserContextKeyedServiceFactory {
18 public:
20 // Returns a settings object for the given context.
21 static DataReductionProxyChromeSettings* GetForBrowserContext(
22 content::BrowserContext* context);
24 // Returns true if this context has a settings object.
25 static bool HasDataReductionProxyChromeSettings(
26 content::BrowserContext* context);
28 // Returns an instance of this factory.
29 static DataReductionProxyChromeSettingsFactory* GetInstance();
31 private:
32 friend struct DefaultSingletonTraits<DataReductionProxyChromeSettingsFactory>;
34 DataReductionProxyChromeSettingsFactory();
36 ~DataReductionProxyChromeSettingsFactory() override;
38 // BrowserContextKeyedServiceFactory:
39 KeyedService* BuildServiceInstanceFor(
40 content::BrowserContext* context) const override;
42 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettingsFactory);
45 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_FACTORY_H_