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

Unified Diff: components/data_usage/core/data_use.cc

Issue 1390993005: Amortize data usage using TrafficStats on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data_use_buffering
Patch Set: Simplified and polished design, still ironing out tests Created 5 years, 1 month 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_usage/core/data_use.cc
diff --git a/components/data_usage/core/data_use.cc b/components/data_usage/core/data_use.cc
index f073dba1e4f5463c6818c0f5337e13ae73092d67..ee69a8b433fe41115214b9eaf9a698b701bab8aa 100644
--- a/components/data_usage/core/data_use.cc
+++ b/components/data_usage/core/data_use.cc
@@ -36,7 +36,10 @@ DataUse::DataUse(const GURL& url,
connection_type(connection_type),
mcc_mnc(mcc_mnc),
tx_bytes(tx_bytes),
- rx_bytes(rx_bytes) {}
+ rx_bytes(rx_bytes),
+ before_tx_bytes(tx_bytes),
+ before_rx_bytes(rx_bytes),
+ created_ticks(base::TimeTicks::Now()) {}
DataUse::~DataUse() {}

Powered by Google App Engine
This is Rietveld 408576698