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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_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/browser/data_reduction_proxy_settings_test_utils.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc
index 90476c4db2bda554e0ae9b86cf1038dc83b26998..124a47a6b7ca1fa4facd56253c86dafe81c2c810 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc
@@ -54,7 +54,7 @@ void DataReductionProxySettingsTestBase::SetUp() {
pref_service->registry()->RegisterDictionaryPref(kProxy);
pref_service->SetBoolean(prefs::kDataReductionProxyWasEnabledBefore, false);
- ResetSettings(nullptr, true, false);
+ ResetSettings(nullptr);
ListPrefUpdate original_update(test_context_->pref_service(),
prefs::kDailyHttpOriginalContentLength);
@@ -73,14 +73,7 @@ void DataReductionProxySettingsTestBase::SetUp() {
template <class C>
void DataReductionProxySettingsTestBase::ResetSettings(
- std::unique_ptr<base::Clock> clock,
- bool promo_allowed,
- bool holdback) {
- int flags = 0;
- if (promo_allowed)
- flags |= DataReductionProxyParams::kPromoAllowed;
- if (holdback)
- flags |= DataReductionProxyParams::kHoldback;
+ std::unique_ptr<base::Clock> clock) {
MockDataReductionProxySettings<C>* settings =
new MockDataReductionProxySettings<C>();
settings->config_ = test_context_->config();
@@ -89,8 +82,6 @@ void DataReductionProxySettingsTestBase::ResetSettings(
test_context_->CreateDataReductionProxyService(settings);
if (clock)
settings->clock_ = std::move(clock);
- test_context_->config()->ResetParamFlagsForTest(flags);
- settings->UpdateConfigValues();
EXPECT_CALL(*settings, GetOriginalProfilePrefs())
.Times(AnyNumber())
.WillRepeatedly(Return(test_context_->pref_service()));
@@ -102,9 +93,7 @@ void DataReductionProxySettingsTestBase::ResetSettings(
// Explicitly generate required instantiations.
template void DataReductionProxySettingsTestBase::ResetSettings<
- DataReductionProxySettings>(std::unique_ptr<base::Clock> clock,
- bool promo_allowed,
- bool holdback);
+ DataReductionProxySettings>(std::unique_ptr<base::Clock> clock);
void DataReductionProxySettingsTestBase::ExpectSetProxyPrefs(
bool expected_enabled,

Powered by Google App Engine
This is Rietveld 408576698