Index: chrome/browser/android/data_usage/data_use_tab_model.h |
diff --git a/chrome/browser/android/data_usage/data_use_tab_model.h b/chrome/browser/android/data_usage/data_use_tab_model.h |
index 2b60f2d86cd95d72330e2b949df2dfe0e03cc2bf..a541b45051d16bf06ae74bd3e185820e2daeaee0 100644 |
--- a/chrome/browser/android/data_usage/data_use_tab_model.h |
+++ b/chrome/browser/android/data_usage/data_use_tab_model.h |
@@ -11,6 +11,7 @@ |
#include <string> |
#include <vector> |
+#include "base/callback_forward.h" |
#include "base/containers/hash_tables.h" |
#include "base/gtest_prod_util.h" |
#include "base/macros.h" |
@@ -105,15 +106,17 @@ class DataUseTabModel { |
static const char kDefaultTag[]; |
static const char kCustomTabTag[]; |
- DataUseTabModel(); |
- |
- // Initializes |this| on UI thread. |external_data_use_observer_bridge| is the |
- // pointer to ExternalDataUseObserverBridge object. DataUseTabModel and |
+ // |external_data_use_observer_bridge| is the pointer to |
+ // ExternalDataUseObserverBridge object. DataUseTabModel and |
// ExternalDataUseObserverBridge objects are owned by ExternalDataUseObserver |
// and DataUseTabModel is destroyed first followed by |
// ExternalDataUseObserverBridge. |
- void InitOnUIThread( |
- const ExternalDataUseObserverBridge* external_data_use_observer_bridge); |
+ DataUseTabModel( |
+ const base::Closure& fetch_matching_rules_callback, |
+ const base::Callback<void(bool)>& on_matching_rules_fetched_callback); |
+ |
+ // Initializes |this| on UI thread. |
+ void InitOnUIThread(); |
virtual ~DataUseTabModel(); |
@@ -143,7 +146,7 @@ class DataUseTabModel { |
// Notifies the DataUseTabModel that tracking label |label| is removed. Any |
// active tracking sessions with the label are ended, without notifying any of |
// the TabDataUseObserver. |
- virtual void OnTrackingLabelRemoved(std::string label); |
+ virtual void OnTrackingLabelRemoved(const std::string& label); |
// Gets the tracking information for the tab with id |tab_id| at time |
// |timestamp|. |output_info| must not be null. If a tab tracking session is |
@@ -305,6 +308,9 @@ class DataUseTabModel { |
// Stores the matching patterns. |
std::unique_ptr<DataUseMatcher> data_use_matcher_; |
+ // Callback to be run to initiate fetching the matching rules. |
+ const base::Closure& fetch_matching_rules_callback_; |
+ |
// True if DataUseTabModel is ready to process UI navigation events. |
// DataUseTabModel will be considered ready when the first rule fetch is |
// complete or the control app not installed callback was received, whichever |