| Index: components/ntp_snippets/user_classifier.h
|
| diff --git a/components/ntp_snippets/user_classifier.h b/components/ntp_snippets/user_classifier.h
|
| index 477e23ac760d1c3b9704e2292f8e0bd0b9e06901..93be8fa42e02af8807fd89b0621d0b5980c1f578 100644
|
| --- a/components/ntp_snippets/user_classifier.h
|
| +++ b/components/ntp_snippets/user_classifier.h
|
| @@ -5,14 +5,18 @@
|
| #ifndef COMPONENTS_NTP_SNIPPETS_USER_CLASSIFIER_H_
|
| #define COMPONENTS_NTP_SNIPPETS_USER_CLASSIFIER_H_
|
|
|
| +#include <memory>
|
| #include <string>
|
|
|
| #include "base/macros.h"
|
| -#include "base/time/time.h"
|
|
|
| class PrefRegistrySimple;
|
| class PrefService;
|
|
|
| +namespace base {
|
| +class Clock;
|
| +} // namespace base
|
| +
|
| namespace ntp_snippets {
|
|
|
| // Collects data about user usage patterns of content suggestions, computes
|
| @@ -52,7 +56,7 @@ class UserClassifier {
|
| };
|
|
|
| // The provided |pref_service| may be nullptr in unit-tests.
|
| - explicit UserClassifier(PrefService* pref_service);
|
| + UserClassifier(PrefService* pref_service, std::unique_ptr<base::Clock> clock);
|
| ~UserClassifier();
|
|
|
| // Registers profile prefs for all metrics. Called from browser_prefs.cc.
|
| @@ -93,6 +97,7 @@ class UserClassifier {
|
| void ClearMetricValue(Metric metric);
|
|
|
| PrefService* pref_service_;
|
| + std::unique_ptr<base::Clock> clock_;
|
|
|
| // Params of the metric.
|
| const double discount_rate_per_hour_;
|
|
|