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 SequencedTaskRunner; | |
| 15 class SingleThreadTaskRunner; | 16 class SingleThreadTaskRunner; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace data_reduction_proxy { | 19 namespace data_reduction_proxy { |
| 19 class DataReductionProxyIOData; | 20 class DataReductionProxyIOData; |
| 21 class DataStore; | |
| 20 } | 22 } |
| 21 | 23 |
| 22 namespace net { | 24 namespace net { |
| 23 class URLRequestContextGetter; | 25 class URLRequestContextGetter; |
| 24 } | 26 } |
| 25 | 27 |
| 26 class PrefService; | 28 class PrefService; |
| 27 | 29 |
| 28 // Data reduction proxy settings class suitable for use with a Chrome browser. | 30 // Data reduction proxy settings class suitable for use with a Chrome browser. |
| 29 // It is keyed to a browser context. | 31 // It is keyed to a browser context. |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 49 // the UI thread. | 51 // the UI thread. |
| 50 DataReductionProxyChromeSettings(); | 52 DataReductionProxyChromeSettings(); |
| 51 | 53 |
| 52 // Destructs the settings object. | 54 // Destructs the settings object. |
| 53 ~DataReductionProxyChromeSettings() override; | 55 ~DataReductionProxyChromeSettings() override; |
| 54 | 56 |
| 55 // Overrides KeyedService::Shutdown: | 57 // Overrides KeyedService::Shutdown: |
| 56 void Shutdown() override; | 58 void Shutdown() override; |
| 57 | 59 |
| 58 // Initialize the settings object with the given io_data, prefs services, | 60 // Initialize the settings object with the given io_data, prefs services, |
| 59 // request context getter, and task runner. | 61 // request context getter, and task runner. |
|
jeremyim
2015/07/13 20:19:40
Update comment with new params
Not at Google. Contact bengr
2015/07/14 16:41:30
Done.
| |
| 60 void InitDataReductionProxySettings( | 62 void InitDataReductionProxySettings( |
| 61 data_reduction_proxy::DataReductionProxyIOData* io_data, | 63 data_reduction_proxy::DataReductionProxyIOData* io_data, |
| 62 PrefService* profile_prefs, | 64 PrefService* profile_prefs, |
| 63 net::URLRequestContextGetter* request_context_getter, | 65 net::URLRequestContextGetter* request_context_getter, |
| 64 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner); | 66 scoped_ptr<data_reduction_proxy::DataStore> store, |
| 67 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner, | |
| 68 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner); | |
| 65 | 69 |
| 66 // Gets the client type for the data reduction proxy. | 70 // Gets the client type for the data reduction proxy. |
| 67 static data_reduction_proxy::Client GetClient(); | 71 static data_reduction_proxy::Client GetClient(); |
| 68 | 72 |
| 69 // Public for testing. | 73 // Public for testing. |
| 70 void MigrateDataReductionProxyOffProxyPrefs(PrefService* prefs); | 74 void MigrateDataReductionProxyOffProxyPrefs(PrefService* prefs); |
| 71 | 75 |
| 72 private: | 76 private: |
| 73 // Helper method for migrating the Data Reduction Proxy away from using the | 77 // Helper method for migrating the Data Reduction Proxy away from using the |
| 74 // proxy pref. Returns the ProxyPrefMigrationResult value indicating the | 78 // proxy pref. Returns the ProxyPrefMigrationResult value indicating the |
| 75 // migration action taken. | 79 // migration action taken. |
| 76 ProxyPrefMigrationResult MigrateDataReductionProxyOffProxyPrefsHelper( | 80 ProxyPrefMigrationResult MigrateDataReductionProxyOffProxyPrefsHelper( |
| 77 PrefService* prefs); | 81 PrefService* prefs); |
| 78 | 82 |
| 79 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettings); | 83 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettings); |
| 80 }; | 84 }; |
| 81 | 85 |
| 82 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ | 86 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_H_ |
| OLD | NEW |