Index: chrome/browser/android/data_usage/external_data_use_observer.cc |
diff --git a/chrome/browser/android/data_usage/external_data_use_observer.cc b/chrome/browser/android/data_usage/external_data_use_observer.cc |
index 36d3c860696f824c193bcb56a3c77f97804bc704..02b5fd06603ff5834792b53291363048d571d135 100644 |
--- a/chrome/browser/android/data_usage/external_data_use_observer.cc |
+++ b/chrome/browser/android/data_usage/external_data_use_observer.cc |
@@ -6,6 +6,8 @@ |
#include <utility> |
+#include "base/bind.h" |
+#include "base/callback.h" |
#include "base/containers/hash_tables.h" |
#include "base/message_loop/message_loop.h" |
#include "base/metrics/field_trial.h" |
@@ -133,7 +135,12 @@ ExternalDataUseObserver::ExternalDataUseObserver( |
const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner) |
: data_use_aggregator_(data_use_aggregator), |
external_data_use_observer_bridge_(new ExternalDataUseObserverBridge()), |
- data_use_tab_model_(new DataUseTabModel()), |
+ data_use_tab_model_(new DataUseTabModel( |
+ base::Bind(&ExternalDataUseObserverBridge::FetchMatchingRules, |
+ base::Unretained(external_data_use_observer_bridge_)), |
tbansal1
2016/07/18 17:04:38
Add comment about why it is okay to use base::Unre
Raj
2016/07/19 00:19:02
Done.
|
+ base::Bind( |
+ &ExternalDataUseObserverBridge::ShouldRegisterAsDataUseObserver, |
+ base::Unretained(external_data_use_observer_bridge_)))), |
last_data_report_submitted_ticks_(base::TimeTicks()), |
pending_report_bytes_(0), |
ui_task_runner_(ui_task_runner), |
@@ -160,8 +167,7 @@ ExternalDataUseObserver::ExternalDataUseObserver( |
ui_task_runner_->PostTask(FROM_HERE, |
base::Bind(&DataUseTabModel::InitOnUIThread, |
tbansal1
2016/07/18 17:04:38
Is it possible that this initialization calls the
Raj
2016/07/19 00:19:02
Removed this. InitOnUIThread() is not needed.
|
- base::Unretained(data_use_tab_model_), |
- external_data_use_observer_bridge_)); |
+ base::Unretained(data_use_tab_model_))); |
// Initialize the ExternalDataUseObserverBridge object. It is okay to use |
// base::Unretained here since |external_data_use_observer_bridge_| is owned |