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

Unified Diff: chrome/browser/io_thread.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: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 165bf37aaafac32b370109297fbcd70c6021dfa4..7f359cfd738ca12a29047be32337d5160f2737a2 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -108,6 +108,7 @@
#if defined(OS_ANDROID)
#include "base/android/build_info.h"
+#include "chrome/browser/android/datausage/external_data_use_observer_android.h"
#include "chrome/browser/android/net/external_estimate_provider_android.h"
#endif
@@ -583,6 +584,16 @@ void IOThread::Init() {
globals_->data_use_aggregator.get(),
true /* is_data_usage_off_the_record */);
+#if defined(OS_ANDROID)
+ scoped_ptr<data_usage::DataUseAggregator::Observer>
+ external_data_use_observer(
+ new chrome::android::ExternalDataUseObserverAndroid(
+ globals_->data_use_aggregator.get()));
+
+ globals_->data_use_aggregator->PassExternalObserver(
+ external_data_use_observer.Pass());
+#endif
+
// TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432
// is fixed.
tracked_objects::ScopedTracker tracking_profile4(

Powered by Google App Engine
This is Rietveld 408576698