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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc

Issue 888713002: DataReductionProxyStatisticsPrefs should support WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Webview fix Created 5 years, 10 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_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 c712a158b5a8da1d01fa8e51df324cd7f9eea37f..e14c0aaf475cb5b7bd618782cecb9692720f2268 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,32 +466,4 @@ void UpdateContentLengthPrefsForDataReductionProxy(
}
}
-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

Powered by Google App Engine
This is Rietveld 408576698