Chromium Code Reviews| Index: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h |
| diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h |
| index 8efc3edd4ea7221091995f922acca32b3da01fff..ddb2248965ecfdb24f5052553725b6b02434bf5b 100644 |
| --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h |
| +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h |
| @@ -9,14 +9,27 @@ |
| #include <vector> |
| #include "base/gtest_prod_util.h" |
| +#include "base/task_runner.h" |
| #include "components/data_reduction_proxy/browser/data_reduction_proxy_configurator.h" |
| +#include "net/proxy/proxy_config.h" |
| + |
| +namespace base { |
| +class SingleThreadTaskRunner; |
| +} |
| + |
| +namespace net { |
| +class ProxyInfo; |
| +class ProxyService; |
| +} |
| class PrefService; |
| class DataReductionProxyChromeConfigurator |
| : public data_reduction_proxy::DataReductionProxyConfigurator { |
| public: |
| - explicit DataReductionProxyChromeConfigurator(PrefService* prefs); |
| + explicit DataReductionProxyChromeConfigurator( |
| + PrefService* prefs, |
| + scoped_refptr<base::SingleThreadTaskRunner> network_task_runner); |
|
mef
2014/08/11 19:44:40
Does it have to be SingleThreaded or SequencedTask
bengr
2014/08/11 23:03:19
Done.
|
| virtual ~DataReductionProxyChromeConfigurator(); |
| virtual void Enable(bool primary_restricted, |
| @@ -38,11 +51,23 @@ class DataReductionProxyChromeConfigurator |
| // as a hostname pattern. Subclasses may implement other semantics. |
| virtual void AddURLPatternToBypass(const std::string& pattern) OVERRIDE; |
| + // Updates the config for use on the IO thread. |
| + void UpdateProxyConfigOnIOThread(const net::ProxyConfig& config); |
| + |
| + // Returns the current data reduction proxy config, even if it is not the |
| + // effective configuration used by the proxy service. Note the ID of the |
| + // proxy config is set to a bogus value. It cannot be left uninitialized, |
| + // else the config will return invalid. |
| + void GetProxyConfigOnIO(net::ProxyConfig* config); |
|
marq (ping after 24h)
2014/08/11 16:11:33
OnIOThread, for naming consistency.
bengr
2014/08/11 23:03:19
Done.
|
| + |
| private: |
| FRIEND_TEST_ALL_PREFIXES(DataReductionProxyConfigTest, TestBypassList); |
| PrefService* prefs_; |
| + scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; |
| + |
| std::vector<std::string> bypass_rules_; |
| + net::ProxyConfig config_; |
| DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeConfigurator); |
| }; |