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

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

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.h
diff --git a/components/data_use_measurement/core/data_use.h b/components/data_use_measurement/core/data_use.h
index d2b789706fd4bf7efb9dea4f916fa528ec21028c..6a1c950e5859f3ff781808d8736c522a68333828 100644
--- a/components/data_use_measurement/core/data_use.h
+++ b/components/data_use_measurement/core/data_use.h
@@ -56,6 +56,10 @@ class DataUse : public base::SupportsUserData {
description_ = description;
}
+ // Increments the total received and sent byte counts. Can be used to
+ // decrement the byte counts as well.
+ void IncrementTotalBytes(int64_t bytes_received, int64_t bytes_sent);
+
int64_t total_bytes_received() const { return total_bytes_received_; }
int64_t total_bytes_sent() const { return total_bytes_sent_; }
@@ -63,10 +67,6 @@ class DataUse : public base::SupportsUserData {
TrafficType traffic_type() const { return traffic_type_; }
private:
- // TODO(rajendrant): Remove this friend after adding member function to
- // increment total sent/received bytes.
- friend class DataUseRecorder;
-
GURL url_;
std::string description_;
const TrafficType traffic_type_;

Powered by Google App Engine
This is Rietveld 408576698