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

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

Issue 2950603003: Minor refactor to get rid of a friend association (Closed)
Patch Set: Created 3 years, 6 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_use_measurement/core/data_use.cc
diff --git a/components/data_use_measurement/core/data_use.cc b/components/data_use_measurement/core/data_use.cc
index 99fb8cb2f953705154b93b2bf132c5c502ee8baa..9c34e8a8ce2faf750ca0624e44df7db2576a1699 100644
--- a/components/data_use_measurement/core/data_use.cc
+++ b/components/data_use_measurement/core/data_use.cc
@@ -13,6 +13,11 @@ DataUse::DataUse(TrafficType traffic_type)
DataUse::~DataUse() {}
+void DataUse::IncrementTotalBytes(int64_t bytes_received, int64_t bytes_sent) {
+ total_bytes_received_ += bytes_received;
+ total_bytes_sent_ += bytes_sent;
+}
+
void DataUse::MergeFrom(const DataUse& other) {
// Traffic type need not be same while merging. One of the data use created
// when mainframe is created could have UNKNOWN traffic type, and later merged

Powered by Google App Engine
This is Rietveld 408576698