Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h

Issue 2889993004: New CPAT support in DataReductionProxyConfig guarded by feature flag. (Closed)
Patch Set: Added const-ness to PreviewDecider arg Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG _TEST_UTILS_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG _TEST_UTILS_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG _TEST_UTILS_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG _TEST_UTILS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Sets the proxy index of the data reduction proxy. Subsequent calls to 110 // Sets the proxy index of the data reduction proxy. Subsequent calls to
111 // WasDataReductionProxyUsed are affected. 111 // WasDataReductionProxyUsed are affected.
112 void SetWasDataReductionProxyUsedProxyIndex(int proxy_index); 112 void SetWasDataReductionProxyUsedProxyIndex(int proxy_index);
113 113
114 // Resets the behavior of WasDataReductionProxyUsed() calls. 114 // Resets the behavior of WasDataReductionProxyUsed() calls.
115 void ResetWasDataReductionProxyUsed(); 115 void ResetWasDataReductionProxyUsed();
116 116
117 // Sets if the captive portal probe has been blocked for the current network. 117 // Sets if the captive portal probe has been blocked for the current network.
118 void SetIsCaptivePortal(bool is_captive_portal); 118 void SetIsCaptivePortal(bool is_captive_portal);
119 119
120 void SetConnectionTypeForTesting(
121 net::NetworkChangeNotifier::ConnectionType connection_type) {
122 connection_type_ = connection_type;
123 }
124
120 using DataReductionProxyConfig::UpdateConfigForTesting; 125 using DataReductionProxyConfig::UpdateConfigForTesting;
121 126
122 private: 127 private:
123 bool GetIsCaptivePortal() const override; 128 bool GetIsCaptivePortal() const override;
124 129
125 base::TickClock* tick_clock_; 130 base::TickClock* tick_clock_;
126 131
127 base::Optional<bool> was_data_reduction_proxy_used_; 132 base::Optional<bool> was_data_reduction_proxy_used_;
128 base::Optional<int> proxy_index_; 133 base::Optional<int> proxy_index_;
129 134
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 186
182 using DataReductionProxyConfig::UpdateConfigForTesting; 187 using DataReductionProxyConfig::UpdateConfigForTesting;
183 188
184 // Resets the Lo-Fi status to default state. 189 // Resets the Lo-Fi status to default state.
185 void ResetLoFiStatusForTest(); 190 void ResetLoFiStatusForTest();
186 }; 191 };
187 192
188 } // namespace data_reduction_proxy 193 } // namespace data_reduction_proxy
189 194
190 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CON FIG_TEST_UTILS_H_ 195 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CON FIG_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698