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 COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_CONFIG_SERV
ICE_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_CONFIG_SERV
ICE_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_CONFIG_SERV
ICE_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_CONFIG_SERV
ICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // A data_reduction_proxy::DataReductionProxyConfigurator implementation that | 87 // A data_reduction_proxy::DataReductionProxyConfigurator implementation that |
88 // tracks changes to the data reduction proxy configuration and notifies an | 88 // tracks changes to the data reduction proxy configuration and notifies an |
89 // associated DataReductionProxyConfigService. Configuration changes include | 89 // associated DataReductionProxyConfigService. Configuration changes include |
90 // adding URL and host patterns to bypass and enabling and disabling use of the | 90 // adding URL and host patterns to bypass and enabling and disabling use of the |
91 // proxy. | 91 // proxy. |
92 class DataReductionProxyConfigTracker : public DataReductionProxyConfigurator { | 92 class DataReductionProxyConfigTracker : public DataReductionProxyConfigurator { |
93 public: | 93 public: |
94 DataReductionProxyConfigTracker( | 94 DataReductionProxyConfigTracker( |
95 base::Callback<void(bool, const net::ProxyConfig&)> update_proxy_config, | 95 base::Callback<void(bool, const net::ProxyConfig&)> update_proxy_config, |
96 base::TaskRunner* task_runner); | 96 const scoped_refptr<base::TaskRunner>& task_runner); |
97 virtual ~DataReductionProxyConfigTracker(); | 97 virtual ~DataReductionProxyConfigTracker(); |
98 | 98 |
99 virtual void Enable(bool primary_restricted, | 99 virtual void Enable(bool primary_restricted, |
100 bool fallback_restricted, | 100 bool fallback_restricted, |
101 const std::string& primary_origin, | 101 const std::string& primary_origin, |
102 const std::string& fallback_origin, | 102 const std::string& fallback_origin, |
103 const std::string& ssl_origin) override; | 103 const std::string& ssl_origin) override; |
104 virtual void Disable() override; | 104 virtual void Disable() override; |
105 virtual void AddHostPatternToBypass(const std::string& pattern) override; | 105 virtual void AddHostPatternToBypass(const std::string& pattern) override; |
106 virtual void AddURLPatternToBypass(const std::string& pattern) override; | 106 virtual void AddURLPatternToBypass(const std::string& pattern) override; |
(...skipping 12 matching lines...) Expand all Loading... |
119 base::Callback<void(bool, const net::ProxyConfig&)> update_proxy_config_; | 119 base::Callback<void(bool, const net::ProxyConfig&)> update_proxy_config_; |
120 std::vector<std::string> bypass_rules_; | 120 std::vector<std::string> bypass_rules_; |
121 scoped_refptr<base::TaskRunner> task_runner_; | 121 scoped_refptr<base::TaskRunner> task_runner_; |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyConfigTracker); | 123 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyConfigTracker); |
124 }; | 124 }; |
125 | 125 |
126 } // namespace data_reduction_proxy | 126 } // namespace data_reduction_proxy |
127 | 127 |
128 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_CONFIG_S
ERVICE_H_ | 128 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_CONFIG_S
ERVICE_H_ |
OLD | NEW |