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

Unified Diff: components/ntp_snippets/content_suggestions_service_unittest.cc

Issue 2774663002: [Remote suggestions] Refactor the scheduler (Closed)
Patch Set: Marc's nits #2 Created 3 years, 9 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: components/ntp_snippets/content_suggestions_service_unittest.cc
diff --git a/components/ntp_snippets/content_suggestions_service_unittest.cc b/components/ntp_snippets/content_suggestions_service_unittest.cc
index 6a8236ab4cd28b62a084eede40063002b10d9d75..ccab94963ffa9cf964dadc5dd17fe5378f5e1222 100644
--- a/components/ntp_snippets/content_suggestions_service_unittest.cc
+++ b/components/ntp_snippets/content_suggestions_service_unittest.cc
@@ -14,6 +14,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
+#include "base/time/default_clock.h"
#include "components/ntp_snippets/category_info.h"
#include "components/ntp_snippets/category_rankers/constant_category_ranker.h"
#include "components/ntp_snippets/category_rankers/fake_category_ranker.h"
@@ -146,9 +147,15 @@ class ContentSuggestionsServiceTest : public testing::Test {
void CreateContentSuggestionsService(
ContentSuggestionsService::State enabled) {
ASSERT_FALSE(service_);
+
+ // TODO(jkrcal): Replace by a mock.
+ auto user_classifier = base::MakeUnique<UserClassifier>(
+ pref_service_.get(), base::MakeUnique<base::DefaultClock>());
+
service_ = base::MakeUnique<ContentSuggestionsService>(
enabled, /*signin_manager=*/nullptr, /*history_service=*/nullptr,
- pref_service_.get(), std::move(category_ranker_));
+ pref_service_.get(), std::move(category_ranker_),
+ std::move(user_classifier), /*scheduler=*/nullptr);
}
void ResetService() {

Powered by Google App Engine
This is Rietveld 408576698