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

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

Issue 2922663002: Data Reduction Proxy: Remove duplicate functions (Closed)
Patch Set: megjablon comments Created 3 years, 6 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 3a68f3ab5d169f5baacd6c3c14257d8b05b19348..5b1620789db5f7387a7a463ccb208014208bb2e6 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
@@ -16,10 +16,8 @@ static const char kFlagSecureProxyCheckURL[] = "http://proxycheck.org/";
}
namespace data_reduction_proxy {
-TestDataReductionProxyParams::TestDataReductionProxyParams(
- int flags, unsigned int has_definitions)
- : DataReductionProxyParams(flags, false),
- has_definitions_(has_definitions) {
+TestDataReductionProxyParams::TestDataReductionProxyParams()
+ : DataReductionProxyParams(false) {
init_result_ = Init();
}
@@ -57,26 +55,16 @@ std::string TestDataReductionProxyParams::FlagSecureProxyCheckURL() {
}
std::string TestDataReductionProxyParams::GetDefaultOrigin() const {
- return GetDefinition(
- TestDataReductionProxyParams::HAS_ORIGIN, kDefaultOrigin);
+ return kDefaultOrigin;
}
std::string TestDataReductionProxyParams::GetDefaultFallbackOrigin() const {
- return GetDefinition(
- TestDataReductionProxyParams::HAS_FALLBACK_ORIGIN,
- kDefaultFallbackOrigin);
+ return kDefaultFallbackOrigin;
}
std::string TestDataReductionProxyParams::GetDefaultSecureProxyCheckURL()
const {
- return GetDefinition(
- TestDataReductionProxyParams::HAS_SECURE_PROXY_CHECK_URL,
- kDefaultSecureProxyCheckURL);
+ return kDefaultSecureProxyCheckURL;
}
-std::string TestDataReductionProxyParams::GetDefinition(
- unsigned int has_def,
- const std::string& definition) const {
- return ((has_definitions_ & has_def) ? definition : std::string());
-}
} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698