| Index: components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
|
| diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
|
| index 7cf609a139d3d4a123d0900208a2c563bde4c266..40c9552a127b6384c79a2689effd32a7cbcdbf85 100644
|
| --- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
|
| +++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
|
| @@ -10,6 +10,10 @@
|
| #include "base/prefs/pref_registry_simple.h"
|
| #include "base/prefs/scoped_user_pref_update.h"
|
| #include "base/strings/string_number_conversions.h"
|
| +#include "base/test/test_simple_task_runner.h"
|
| +#include "base/time/time.h"
|
| +#include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h"
|
| +#include "components/data_reduction_proxy/browser/data_reduction_proxy_statistics_prefs.h"
|
| #include "components/data_reduction_proxy/common/data_reduction_proxy_pref_names.h"
|
| #include "components/data_reduction_proxy/common/data_reduction_proxy_switches.h"
|
|
|
| @@ -76,8 +80,7 @@ void TestDataReductionProxyConfig::Disable() {
|
| }
|
|
|
| DataReductionProxySettingsTestBase::DataReductionProxySettingsTestBase()
|
| - : testing::Test() {
|
| -}
|
| + : testing::Test() {}
|
|
|
| DataReductionProxySettingsTestBase::~DataReductionProxySettingsTestBase() {}
|
|
|
| @@ -93,6 +96,13 @@ void DataReductionProxySettingsTestBase::SetUp() {
|
| registry->RegisterBooleanPref(prefs::kDataReductionProxyAltEnabled, false);
|
| registry->RegisterBooleanPref(prefs::kDataReductionProxyWasEnabledBefore,
|
| false);
|
| +
|
| + statistics_prefs_.reset(new DataReductionProxyStatisticsPrefs(
|
| + &pref_service_,
|
| + scoped_refptr<base::TestSimpleTaskRunner>(
|
| + new base::TestSimpleTaskRunner()),
|
| + base::TimeDelta()));
|
| +
|
| //AddProxyToCommandLine();
|
| ResetSettings(true, true, false, true, false);
|
|
|
| @@ -106,7 +116,7 @@ void DataReductionProxySettingsTestBase::SetUp() {
|
| received_update->Insert(0, new base::StringValue(base::Int64ToString(i)));
|
| }
|
| last_update_time_ = base::Time::Now().LocalMidnight();
|
| - pref_service_.SetInt64(
|
| + statistics_prefs_->SetInt64(
|
| prefs::kDailyHttpContentLengthLastUpdateDate,
|
| last_update_time_.ToInternalValue());
|
| expected_params_.reset(new TestDataReductionProxyParams(
|
| @@ -148,6 +158,7 @@ void DataReductionProxySettingsTestBase::ResetSettings(bool allowed,
|
| settings_.reset(settings);
|
| configurator_.reset(new TestDataReductionProxyConfig());
|
| settings_->configurator_ = configurator_.get();
|
| + settings_->SetDataReductionProxyStatisticsPrefs(statistics_prefs_.get());
|
| }
|
|
|
| // Explicitly generate required instantiations.
|
| @@ -303,7 +314,6 @@ void DataReductionProxySettingsTestBase::CheckInitDataReductionProxy(
|
|
|
| settings_->InitDataReductionProxySettings(
|
| &pref_service_,
|
| - &pref_service_,
|
| request_context.get());
|
| settings_->SetOnDataReductionEnabledCallback(
|
| base::Bind(&DataReductionProxySettingsTestBase::
|
|
|