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

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

Issue 2759423003: [UserClassifier] Inject a clock (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48098c7afe3b63466064f45a9af81c2f4253790a..2815c5292ab4d3178cdeb705ddde02ee97532a29 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -11,8 +11,10 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "base/time/default_clock.h"
#include "base/values.h"
#include "components/ntp_snippets/pref_names.h"
#include "components/prefs/pref_registry_simple.h"
@@ -33,7 +35,7 @@ ContentSuggestionsService::ContentSuggestionsService(
remote_suggestions_provider_(nullptr),
remote_suggestions_scheduler_(nullptr),
pref_service_(pref_service),
- user_classifier_(pref_service),
+ user_classifier_(pref_service, base::MakeUnique<base::DefaultClock>()),
Marc Treib 2017/03/21 09:43:20 Hm, eventually we should probably pass in the User
jkrcal 2017/03/21 09:46:59 Agreed. There's also a lot of duplication in the u
category_ranker_(std::move(category_ranker)) {
// Can be null in tests.
if (signin_manager) {
« no previous file with comments | « no previous file | components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698