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

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

Issue 2367403005: Snackbar for promoting Data Saver to existing users (Closed)
Patch Set: rename "data saving" to "data savings" for consistency Created 4 years, 2 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.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
index 92851186a1d460a139a8e29fc3708a71e5475c38..c0e1cd3439d80526d8712d3b9bad98c3e3323406 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
@@ -151,6 +151,14 @@ int64_t DataReductionProxySettings::GetDataReductionLastUpdateTime() {
data_reduction_proxy_service_->compression_stats()->GetLastUpdateTime();
}
+int64_t DataReductionProxySettings::GetTotalHttpContentLengthSaved() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return data_reduction_proxy_service_->compression_stats()
+ ->GetHttpOriginalContentLength() -
+ data_reduction_proxy_service_->compression_stats()
+ ->GetHttpReceivedContentLength();
+}
+
void DataReductionProxySettings::SetUnreachable(bool unreachable) {
unreachable_ = unreachable;
}
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698