| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
|
| index b0b574df9c8c109f9c82a092d8a49545fbe3befc..444ee3978be5eed0aa7f137e0d111aa92a2da485 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc
|
| @@ -95,9 +95,13 @@ TEST_F(ChromeNetworkDataSavingMetricsTest, TotalLengths) {
|
| const int64 kOriginalLength = 200;
|
| const int64 kReceivedLength = 100;
|
|
|
| + BooleanPrefMember data_reduction_proxy_enabled;
|
| + data_reduction_proxy_enabled.Init(
|
| + data_reduction_proxy::prefs::kDataReductionProxyEnabled, &pref_service_);
|
| +
|
| UpdateContentLengthPrefs(
|
| kReceivedLength, kOriginalLength,
|
| - &pref_service_, UNKNOWN_TYPE, statistics_prefs_.get());
|
| + &data_reduction_proxy_enabled, UNKNOWN_TYPE, statistics_prefs_.get());
|
|
|
| EXPECT_EQ(kReceivedLength,
|
| statistics_prefs_->GetInt64(
|
| @@ -111,7 +115,7 @@ TEST_F(ChromeNetworkDataSavingMetricsTest, TotalLengths) {
|
| // Record the same numbers again, and total lengths should be doubled.
|
| UpdateContentLengthPrefs(
|
| kReceivedLength, kOriginalLength,
|
| - &pref_service_, UNKNOWN_TYPE, statistics_prefs_.get());
|
| + &data_reduction_proxy_enabled, UNKNOWN_TYPE, statistics_prefs_.get());
|
|
|
| EXPECT_EQ(kReceivedLength * 2,
|
| statistics_prefs_->GetInt64(
|
| @@ -121,6 +125,7 @@ TEST_F(ChromeNetworkDataSavingMetricsTest, TotalLengths) {
|
| EXPECT_EQ(kOriginalLength * 2,
|
| statistics_prefs_->GetInt64(
|
| data_reduction_proxy::prefs::kHttpOriginalContentLength));
|
| + data_reduction_proxy_enabled.Destroy();
|
| }
|
|
|
| // The initial last update time used in test. There is no leap second a few
|
|
|