Chromium Code Reviews| Index: chrome/browser/android/data_usage/data_use_matcher.h |
| diff --git a/chrome/browser/android/data_usage/data_use_matcher.h b/chrome/browser/android/data_usage/data_use_matcher.h |
| index 9d1a12c9971404bc6ea5dd7924be12edd8a46303..21635a95fa74a491046f5bf9c62027f1c1e09d37 100644 |
| --- a/chrome/browser/android/data_usage/data_use_matcher.h |
| +++ b/chrome/browser/android/data_usage/data_use_matcher.h |
| @@ -13,12 +13,10 @@ |
| #include "base/gtest_prod_util.h" |
| #include "base/macros.h" |
| #include "base/memory/scoped_ptr.h" |
| -#include "base/threading/thread_checker.h" |
|
tbansal1
2016/03/08 18:15:00
Why was this include removed?
Raj
2016/03/09 02:27:35
Done.
|
| #include "base/time/time.h" |
| #include "chrome/browser/android/data_usage/data_use_tab_model.h" |
| namespace base { |
| -class SingleThreadTaskRunner; |
| class TickClock; |
| } |
| @@ -32,7 +30,7 @@ namespace chrome { |
| namespace android { |
| -class ExternalDataUseObserver; |
| +class ExternalDataUseObserverBridge; |
| // DataUseMatcher stores the matching URL patterns and package names along with |
| // the labels. It also provides functionality to get the matching label for a |
| @@ -41,8 +39,7 @@ class DataUseMatcher { |
| public: |
| DataUseMatcher( |
| const base::WeakPtr<DataUseTabModel>& data_use_tab_model, |
| - const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, |
| - const base::WeakPtr<ExternalDataUseObserver>& external_data_use_observer, |
| + const ExternalDataUseObserverBridge* external_data_use_observer_bridge, |
| const base::TimeDelta& default_matching_rule_expiration_duration); |
| ~DataUseMatcher(); |
| @@ -67,7 +64,7 @@ class DataUseMatcher { |
| std::string* label) const WARN_UNUSED_RESULT; |
| // Fetches the matching rules asynchronously from |
| - // |external_data_use_observer_|. |
| + // |external_data_use_observer_bridge_|. |
| void FetchMatchingRules(); |
| // Returns true if there is any valid matching rule. |
| @@ -137,12 +134,12 @@ class DataUseMatcher { |
| // TickClock used for obtaining the current time. |
| scoped_ptr<base::TickClock> tick_clock_; |
| - // |io_task_runner_| is used to call ExternalDataUseObserver methods on |
| - // IO thread. |
| - scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| - // |external_data_use_observer_| is notified when matching rules are fetched. |
| - base::WeakPtr<ExternalDataUseObserver> external_data_use_observer_; |
| + // Pointer to the ExternalDataUseObserverBridge owned by |
| + // ExternalDataUseObserver. DataUseTabModel(owner of |this|) and |
|
tbansal1
2016/03/08 18:15:00
nit: space before (
Raj
2016/03/09 02:27:35
Done.
|
| + // ExternalDataUseObserverBridge are owned by ExternalDataUseObserver, and are |
| + // destroyed in the order. |
| + const ExternalDataUseObserverBridge* external_data_use_observer_bridge_; |
| DISALLOW_COPY_AND_ASSIGN(DataUseMatcher); |
| }; |