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

Unified Diff: chrome/browser/android/data_usage/data_use_tab_model_unittest.cc

Issue 2158913002: Make DataUseTabModel and DataUseMatcher more independent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fix Created 4 years, 5 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/android/data_usage/data_use_tab_model_unittest.cc
diff --git a/chrome/browser/android/data_usage/data_use_tab_model_unittest.cc b/chrome/browser/android/data_usage/data_use_tab_model_unittest.cc
index a3c435cdc909f0a0aaed82ba72d3c47d6d169837..3ae808e6b8ad4b3194df41044c649c918d8afecf 100644
--- a/chrome/browser/android/data_usage/data_use_tab_model_unittest.cc
+++ b/chrome/browser/android/data_usage/data_use_tab_model_unittest.cc
@@ -9,6 +9,8 @@
#include <memory>
#include <string>
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -115,9 +117,12 @@ class DataUseTabModelTest : public testing::Test {
protected:
void SetUp() override {
base::RunLoop().RunUntilIdle();
- data_use_tab_model_.reset(new DataUseTabModel());
- data_use_tab_model_->InitOnUIThread(
- external_data_use_observer_bridge_.get());
+ data_use_tab_model_.reset(new DataUseTabModel(
+ base::Bind(&ExternalDataUseObserverBridge::FetchMatchingRules,
+ base::Unretained(external_data_use_observer_bridge_.get())),
+ base::Bind(
+ &ExternalDataUseObserverBridge::ShouldRegisterAsDataUseObserver,
+ base::Unretained(external_data_use_observer_bridge_.get()))));
tick_clock_ = new base::SimpleTestTickClock();

Powered by Google App Engine
This is Rietveld 408576698