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

Unified Diff: components/ntp_snippets/content_suggestions_service.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.cc
diff --git a/components/ntp_snippets/content_suggestions_service.cc b/components/ntp_snippets/content_suggestions_service.cc
index 3e274ff22a9ba03b263f0d5f716718e721ebb9fa..5ea3194ae4292c237c860c6f52af92a332167aa9 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -28,14 +28,16 @@ ContentSuggestionsService::ContentSuggestionsService(
SigninManagerBase* signin_manager,
history::HistoryService* history_service,
PrefService* pref_service,
- std::unique_ptr<CategoryRanker> category_ranker)
+ std::unique_ptr<CategoryRanker> category_ranker,
+ std::unique_ptr<UserClassifier> user_classifier,
+ std::unique_ptr<RemoteSuggestionsScheduler> remote_suggestions_scheduler)
: state_(state),
signin_observer_(this),
history_service_observer_(this),
remote_suggestions_provider_(nullptr),
- remote_suggestions_scheduler_(nullptr),
pref_service_(pref_service),
- user_classifier_(pref_service, base::MakeUnique<base::DefaultClock>()),
+ remote_suggestions_scheduler_(std::move(remote_suggestions_scheduler)),
+ user_classifier_(std::move(user_classifier)),
category_ranker_(std::move(category_ranker)) {
// Can be null in tests.
if (signin_manager) {
« no previous file with comments | « components/ntp_snippets/content_suggestions_service.h ('k') | components/ntp_snippets/content_suggestions_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698