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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java

Issue 2885473003: Don't interpolate data use and saving values (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java
index 7ec917a5da112ff3404809e94d8a891916e42d07..edcadd1219e3b1a20250b66146a85cc87c07cdfa 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java
@@ -201,19 +201,12 @@ public class DataReductionStatsPreference extends Preference {
final long start = mLeftPosition;
// Include up to the last second of the currently selected day.
final long end = mRightPosition;
- final long now = mCurrentTime;
final Context context = getContext();
- NetworkStatsHistory.Entry compressedEntry =
- mReceivedNetworkStatsHistory.getValues(start, end, now, null);
- // Only received bytes are tracked.
- final long compressedTotalBytes = compressedEntry.rxBytes;
+ final long compressedTotalBytes = mReceivedNetworkStatsHistory.getTotalBytes();
mReceivedTotalPhrase = Formatter.formatFileSize(context, compressedTotalBytes);
- NetworkStatsHistory.Entry originalEntry =
- mOriginalNetworkStatsHistory.getValues(start, end, now, null);
- // Only received bytes are tracked.
- final long originalTotalBytes = originalEntry.rxBytes;
+ final long originalTotalBytes = mOriginalNetworkStatsHistory.getTotalBytes();
mOriginalTotalPhrase = Formatter.formatFileSize(context, originalTotalBytes);
mSavingsTotalPhrase =
Formatter.formatFileSize(context, originalTotalBytes - compressedTotalBytes);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698