| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ |
| 6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ | 6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth
_request_handler.h" | 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth
_request_handler.h" |
| 10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" | 10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" |
| 11 #include "components/keyed_service/core/keyed_service.h" | 11 #include "components/keyed_service/core/keyed_service.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class PrefService; | 14 class PrefService; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace data_reduction_proxy { | 17 namespace data_reduction_proxy { |
| 18 class DataReductionProxyConfigurator; | 18 class DataReductionProxyConfigurator; |
| 19 class DataReductionProxyIOData; |
| 19 class DataReductionProxyEventStore; | 20 class DataReductionProxyEventStore; |
| 20 class DataReductionProxyParams; | 21 class DataReductionProxyParams; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace net { | 24 namespace net { |
| 24 class NetLog; | 25 class NetLog; |
| 25 class URLRequestContextGetter; | 26 class URLRequestContextGetter; |
| 26 } | 27 } |
| 27 | 28 |
| 28 class PrefService; | 29 class PrefService; |
| 29 | 30 |
| 30 // Data reduction proxy settings class suitable for use with a Chrome browser. | 31 // Data reduction proxy settings class suitable for use with a Chrome browser. |
| 31 // It is keyed to a browser context. | 32 // It is keyed to a browser context. |
| 32 class DataReductionProxyChromeSettings | 33 class DataReductionProxyChromeSettings |
| 33 : public data_reduction_proxy::DataReductionProxySettings, | 34 : public data_reduction_proxy::DataReductionProxySettings, |
| 34 public KeyedService { | 35 public KeyedService { |
| 35 public: | 36 public: |
| 36 // Constructs a settings object with the given configuration parameters. | 37 // Constructs a settings object with the given configuration parameters. |
| 37 // Construction and destruction must happen on the UI thread. | 38 // Construction and destruction must happen on the UI thread. |
| 38 explicit DataReductionProxyChromeSettings( | 39 explicit DataReductionProxyChromeSettings( |
| 39 data_reduction_proxy::DataReductionProxyParams* params); | 40 data_reduction_proxy::DataReductionProxyParams* params); |
| 40 | 41 |
| 41 // Destructs the settings object. | 42 // Destructs the settings object. |
| 42 ~DataReductionProxyChromeSettings() override; | 43 ~DataReductionProxyChromeSettings() override; |
| 43 | 44 |
| 44 // Initialize the settings object with the given configurator, prefs services, | 45 // Initialize the settings object with the given configurator, prefs services, |
| 45 // and request context. | 46 // and request context. |
| 46 void InitDataReductionProxySettings( | 47 void InitDataReductionProxySettings( |
| 47 data_reduction_proxy::DataReductionProxyConfigurator* configurator, | 48 data_reduction_proxy::DataReductionProxyIOData* io_data, |
| 48 PrefService* profile_prefs, | 49 PrefService* profile_prefs, |
| 49 PrefService* local_state_prefs, | 50 PrefService* local_state_prefs, |
| 50 net::URLRequestContextGetter* request_context, | 51 net::URLRequestContextGetter* request_context); |
| 51 net::NetLog* net_log, | |
| 52 data_reduction_proxy::DataReductionProxyEventStore* event_store); | |
| 53 | 52 |
| 54 // Gets the client type for the data reduction proxy. | 53 // Gets the client type for the data reduction proxy. |
| 55 static data_reduction_proxy::Client GetClient(); | 54 static data_reduction_proxy::Client GetClient(); |
| 56 | 55 |
| 57 private: | 56 private: |
| 58 // Registers the DataReductionProxyEnabled synthetic field trial with | 57 // Registers the DataReductionProxyEnabled synthetic field trial with |
| 59 // the group |data_reduction_proxy_enabled|. | 58 // the group |data_reduction_proxy_enabled|. |
| 60 void RegisterSyntheticFieldTrial(bool data_reduction_proxy_enabled); | 59 void RegisterSyntheticFieldTrial(bool data_reduction_proxy_enabled); |
| 61 | 60 |
| 62 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettings); | 61 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettings); |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ | 64 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ |
| OLD | NEW |