Index: chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc |
diff --git a/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc b/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc |
index b81f726ffe4f0a633469630e597d2a1e0c63ba18..e27a123f8f59e476a3bce7bbd721fcbf4c6eaa9f 100644 |
--- a/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc |
+++ b/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc |
@@ -10,6 +10,8 @@ |
#include <memory> |
#include <string> |
+#include "base/bind.h" |
+#include "base/bind_helpers.h" |
#include "base/macros.h" |
#include "base/strings/stringprintf.h" |
#include "base/test/histogram_tester.h" |
@@ -21,9 +23,9 @@ |
namespace { |
// Tracking labels for tests. |
-const std::string kTestLabel1 = "label_1"; |
-const std::string kTestLabel2 = "label_2"; |
-const std::string kTestLabel3 = "label_3"; |
+const char kTestLabel1[] = "label_1"; |
+const char kTestLabel2[] = "label_2"; |
+const char kTestLabel3[] = "label_3"; |
enum TabEntrySessionSize { ZERO = 0, ONE, TWO, THREE }; |
@@ -67,12 +69,20 @@ class SimpleOffsetTestTickClock : public base::TickClock { |
class TabDataUseEntryTest : public testing::Test { |
public: |
TabDataUseEntryTest() { |
- tab_model_.reset(new DataUseTabModel()); |
+ tab_model_.reset(new DataUseTabModel( |
+ base::Bind(&TabDataUseEntryTest::FetchMatchingRules, |
+ base::Unretained(this)), |
+ base::Bind(&TabDataUseEntryTest::OnMatchingRulesFetched, |
+ base::Unretained(this)))); |
tick_clock_ = new SimpleOffsetTestTickClock(); |
tab_model_->tick_clock_.reset(tick_clock_); |
tab_entry_.reset(new TabDataUseEntry(tab_model_.get())); |
} |
+ void FetchMatchingRules() {} |
+ |
+ void OnMatchingRulesFetched(bool is_valid) {} |
+ |
size_t GetMaxSessionsPerTab() const { |
return tab_model_->max_sessions_per_tab(); |
} |