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

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

Issue 989663002: HistoricNetworkStatsInfoToValue should use statistics prefs values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 5 years, 9 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_network_delegate.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
index 74e01957b251cf2393c7f238de7e6e8f62f5905b..029d53b71bce0e033880307f622b4953ea44ddf4 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
@@ -110,25 +110,6 @@ void DataReductionProxyNetworkDelegate::InitIODataAndUMA(
data_reduction_proxy_usage_stats_ = usage_stats;
}
-// static
-// TODO(megjablon): Use data_reduction_proxy_delayed_pref_service to read prefs.
-// Until updated the pref values may be up to an hour behind on desktop.
-base::Value* DataReductionProxyNetworkDelegate::HistoricNetworkStatsInfoToValue(
- PrefService* profile_prefs) {
- int64 total_received = profile_prefs->GetInt64(
- data_reduction_proxy::prefs::kHttpReceivedContentLength);
- int64 total_original = profile_prefs->GetInt64(
- data_reduction_proxy::prefs::kHttpOriginalContentLength);
-
- base::DictionaryValue* dict = new base::DictionaryValue();
- // Use strings to avoid overflow. base::Value only supports 32-bit integers.
- dict->SetString("historic_received_content_length",
- base::Int64ToString(total_received));
- dict->SetString("historic_original_content_length",
- base::Int64ToString(total_original));
- return dict;
-}
-
base::Value*
DataReductionProxyNetworkDelegate::SessionNetworkStatsInfoToValue() const {
base::DictionaryValue* dict = new base::DictionaryValue();

Powered by Google App Engine
This is Rietveld 408576698