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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.cc

Issue 1004853002: Create abstraction for DataReductionProxyParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sclittle comments Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.cc
index 632ca2be35cf833453a637e073c34f01c106cde5..df2bc11a5962fa21952c9198229a93d3fc7ffe65 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.cc
@@ -27,11 +27,7 @@ namespace data_reduction_proxy {
TestDataReductionProxyParams::TestDataReductionProxyParams(
int flags, unsigned int has_definitions)
: DataReductionProxyParams(flags, false),
- has_definitions_(has_definitions),
- mock_is_bypassed_by_data_reduction_proxy_local_rules_(false),
- mock_are_data_reduction_proxies_bypassed_(false),
- is_bypassed_by_data_reduction_proxy_local_rules_return_value_(false),
- are_data_reduction_proxies_bypassed_return_value_(false) {
+ has_definitions_(has_definitions) {
init_result_ = Init(
flags & DataReductionProxyParams::kAllowed,
flags & DataReductionProxyParams::kFallbackAllowed,
@@ -43,38 +39,6 @@ bool TestDataReductionProxyParams::init_result() const {
return init_result_;
}
-bool TestDataReductionProxyParams::IsBypassedByDataReductionProxyLocalRules(
- const net::URLRequest& request,
- const net::ProxyConfig& data_reduction_proxy_config) const {
- if (mock_is_bypassed_by_data_reduction_proxy_local_rules_)
- return is_bypassed_by_data_reduction_proxy_local_rules_return_value_;
- return DataReductionProxyParams::IsBypassedByDataReductionProxyLocalRules(
- request, data_reduction_proxy_config);
-}
-
-bool TestDataReductionProxyParams::AreDataReductionProxiesBypassed(
- const net::URLRequest& request,
- const net::ProxyConfig& data_reduction_proxy_config,
- base::TimeDelta* min_retry_delay) const {
- if (mock_are_data_reduction_proxies_bypassed_)
- return are_data_reduction_proxies_bypassed_return_value_;
- return DataReductionProxyParams::AreDataReductionProxiesBypassed(
- request, data_reduction_proxy_config, min_retry_delay);
-}
-
-void TestDataReductionProxyParams::MockAreDataReductionProxiesBypassed(
- bool return_value) {
- mock_are_data_reduction_proxies_bypassed_ = true;
- are_data_reduction_proxies_bypassed_return_value_ = return_value;
-}
-
-void
-TestDataReductionProxyParams::MockIsBypassedByDataReductionProxyLocalRules(
- bool return_value) {
- mock_is_bypassed_by_data_reduction_proxy_local_rules_ = true;
- is_bypassed_by_data_reduction_proxy_local_rules_return_value_ = return_value;
-}
-
// Test values to replace the values specified in preprocessor defines.
std::string TestDataReductionProxyParams::DefaultDevOrigin() {
return kDefaultDevOrigin;

Powered by Google App Engine
This is Rietveld 408576698