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

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

Issue 1393073002: Add external data use observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@datause_accounting_scliitle_cl_do_not_edit_2
Patch Set: Updated Created 5 years, 2 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_usage/core/data_use_aggregator.cc
diff --git a/components/data_usage/core/data_use_aggregator.cc b/components/data_usage/core/data_use_aggregator.cc
index 7613a0126158fe3a49aebe7b4477634c03f6de30..2a4b1c66379e4abe498bf0e385a54c8d0e18a823 100644
--- a/components/data_usage/core/data_use_aggregator.cc
+++ b/components/data_usage/core/data_use_aggregator.cc
@@ -48,6 +48,11 @@ void DataUseAggregator::ReportOffTheRecordDataUse(int64_t tx_bytes,
// data usage calculations if applicable.
}
+void DataUseAggregator::PassExternalObserver(
+ scoped_ptr<Observer> external_observer) {
+ external_observer_ = external_observer.Pass();
+}
+
void DataUseAggregator::NotifyDataUse(
const std::vector<DataUse>& data_use_sequence) {
DCHECK(thread_checker_.CalledOnValidThread());

Powered by Google App Engine
This is Rietveld 408576698