OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_FACTOR
Y_H_ |
| 6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_FACTOR
Y_H_ |
| 7 |
| 8 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 9 |
| 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/singleton.h" |
| 12 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
| 13 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 14 |
| 15 class DataReductionProxyChromeSettings; |
| 16 |
| 17 // Constucts a DataReductionProxySettings object suitable for use with a |
| 18 // Chrome browser. |
| 19 class DataReductionProxyChromeSettingsFactory |
| 20 : public BrowserContextKeyedServiceFactory { |
| 21 public: |
| 22 |
| 23 // Returns a settings object for the given context. |
| 24 static DataReductionProxyChromeSettings* GetForBrowserContext( |
| 25 content::BrowserContext* context); |
| 26 |
| 27 // Returns true if this context has a settings object. |
| 28 static bool HasDataReductionProxyChromeSettings( |
| 29 content::BrowserContext* context); |
| 30 |
| 31 // Returns an instance of this factory. |
| 32 static DataReductionProxyChromeSettingsFactory* GetInstance(); |
| 33 |
| 34 private: |
| 35 friend struct DefaultSingletonTraits<DataReductionProxyChromeSettingsFactory>; |
| 36 |
| 37 DataReductionProxyChromeSettingsFactory(); |
| 38 |
| 39 virtual ~DataReductionProxyChromeSettingsFactory(); |
| 40 |
| 41 // BrowserContextKeyedServiceFactory: |
| 42 virtual KeyedService* BuildServiceInstanceFor( |
| 43 content::BrowserContext* context) const OVERRIDE; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettingsFactory); |
| 46 }; |
| 47 |
| 48 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_FAC
TORY_H_ |
OLD | NEW |