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

Unified Diff: chrome/browser/android/data_usage/tab_data_use_entry_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
« no previous file with comments | « chrome/browser/android/data_usage/external_data_use_observer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « chrome/browser/android/data_usage/external_data_use_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698