Chromium Code Reviews| 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 "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ est_options.h" | 8 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ est_options.h" |
| 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" | 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" |
| 10 #include "components/keyed_service/core/keyed_service.h" | 10 #include "components/keyed_service/core/keyed_service.h" |
| 11 | 11 |
| 12 class PrefService; | 12 class PrefService; |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace data_reduction_proxy { | 18 namespace data_reduction_proxy { |
| 19 class DataReductionProxyIOData; | 19 class DataReductionProxyIOData; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace net { | 22 namespace net { |
| 23 class URLRequestContextGetter; | 23 class URLRequestContextGetter; |
|
sclittle
2015/04/02 00:06:59
Remove unused forward declaration.
tbansal1
2015/04/02 23:21:18
Done.
| |
| 24 } | 24 } |
| 25 | 25 |
| 26 class PrefService; | 26 class PrefService; |
| 27 | 27 |
| 28 // Data reduction proxy settings class suitable for use with a Chrome browser. | 28 // Data reduction proxy settings class suitable for use with a Chrome browser. |
| 29 // It is keyed to a browser context. | 29 // It is keyed to a browser context. |
| 30 class DataReductionProxyChromeSettings | 30 class DataReductionProxyChromeSettings |
| 31 : public data_reduction_proxy::DataReductionProxySettings, | 31 : public data_reduction_proxy::DataReductionProxySettings, |
| 32 public KeyedService { | 32 public KeyedService { |
| 33 public: | 33 public: |
| 34 // Constructs a settings object. Construction and destruction must happen on | 34 // Constructs a settings object. Construction and destruction must happen on |
| 35 // the UI thread. | 35 // the UI thread. |
| 36 DataReductionProxyChromeSettings(); | 36 DataReductionProxyChromeSettings(); |
| 37 | 37 |
| 38 // Destructs the settings object. | 38 // Destructs the settings object. |
| 39 ~DataReductionProxyChromeSettings() override; | 39 ~DataReductionProxyChromeSettings() override; |
| 40 | 40 |
| 41 // Overrides KeyedService::Shutdown: | 41 // Overrides KeyedService::Shutdown: |
| 42 void Shutdown() override; | 42 void Shutdown() override; |
| 43 | 43 |
| 44 // Initialize the settings object with the given io_data, prefs services, | 44 // Initialize the settings object with the given io_data, prefs services, |
| 45 // request context getter, and task runner. | 45 // request context getter, and task runner. |
| 46 void InitDataReductionProxySettings( | 46 void InitDataReductionProxySettings( |
| 47 data_reduction_proxy::DataReductionProxyIOData* io_data, | 47 data_reduction_proxy::DataReductionProxyIOData* io_data, |
| 48 PrefService* profile_prefs, | 48 PrefService* profile_prefs, |
| 49 net::URLRequestContextGetter* request_context_getter, | |
| 50 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner); | 49 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner); |
| 51 | 50 |
| 52 // Gets the client type for the data reduction proxy. | 51 // Gets the client type for the data reduction proxy. |
| 53 static data_reduction_proxy::Client GetClient(); | 52 static data_reduction_proxy::Client GetClient(); |
| 54 | 53 |
| 55 // Public for testing. | 54 // Public for testing. |
| 56 void MigrateDataReductionProxyOffProxyPrefs(PrefService* prefs); | 55 void MigrateDataReductionProxyOffProxyPrefs(PrefService* prefs); |
| 57 | 56 |
| 58 private: | 57 private: |
| 59 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettings); | 58 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettings); |
| 60 }; | 59 }; |
| 61 | 60 |
| 62 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ | 61 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ |
| OLD | NEW |