| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc
|
| index e14c0aaf475cb5b7bd618782cecb9692720f2268..c712a158b5a8da1d01fa8e51df324cd7f9eea37f 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc
|
| @@ -466,4 +466,32 @@
|
| }
|
| }
|
|
|
| +void UpdateContentLengthPrefs(int received_content_length,
|
| + int original_content_length,
|
| + bool data_reduction_proxy_enabled,
|
| + DataReductionProxyRequestType request_type,
|
| + DataReductionProxyStatisticsPrefs* prefs) {
|
| + DCHECK(prefs);
|
| + int64 total_received = prefs->GetInt64(
|
| + data_reduction_proxy::prefs::kHttpReceivedContentLength);
|
| + int64 total_original = prefs->GetInt64(
|
| + data_reduction_proxy::prefs::kHttpOriginalContentLength);
|
| + total_received += received_content_length;
|
| + total_original += original_content_length;
|
| + prefs->SetInt64(
|
| + data_reduction_proxy::prefs::kHttpReceivedContentLength,
|
| + total_received);
|
| + prefs->SetInt64(
|
| + data_reduction_proxy::prefs::kHttpOriginalContentLength,
|
| + total_original);
|
| +
|
| + UpdateContentLengthPrefsForDataReductionProxy(
|
| + received_content_length,
|
| + original_content_length,
|
| + data_reduction_proxy_enabled,
|
| + request_type,
|
| + base::Time::Now(),
|
| + prefs);
|
| +}
|
| +
|
| } // namespace data_reduction_proxy
|
|
|