| Index: components/ntp_snippets/content_suggestions_service.h
|
| diff --git a/components/ntp_snippets/content_suggestions_service.h b/components/ntp_snippets/content_suggestions_service.h
|
| index b207e065b472820fe6117cb086385d66c4ad46d2..d248009265a7936027d27a820bfff37443298cb4 100644
|
| --- a/components/ntp_snippets/content_suggestions_service.h
|
| +++ b/components/ntp_snippets/content_suggestions_service.h
|
| @@ -24,6 +24,7 @@
|
| #include "components/ntp_snippets/category_rankers/category_ranker.h"
|
| #include "components/ntp_snippets/category_status.h"
|
| #include "components/ntp_snippets/content_suggestions_provider.h"
|
| +#include "components/ntp_snippets/remote/remote_suggestions_scheduler.h"
|
| #include "components/ntp_snippets/user_classifier.h"
|
| #include "components/signin/core/browser/signin_manager.h"
|
|
|
| @@ -33,7 +34,6 @@ class PrefRegistrySimple;
|
| namespace ntp_snippets {
|
|
|
| class RemoteSuggestionsProvider;
|
| -class RemoteSuggestionsScheduler;
|
|
|
| // Retrieves suggestions from a number of ContentSuggestionsProviders and serves
|
| // them grouped into categories. There can be at most one provider per category.
|
| @@ -225,11 +225,12 @@ class ContentSuggestionsService : public KeyedService,
|
| // factory. The interface is suited for informing about external events that
|
| // have influence on scheduling remote fetches.
|
| void set_remote_suggestions_scheduler(
|
| - ntp_snippets::RemoteSuggestionsScheduler* remote_suggestions_scheduler) {
|
| - remote_suggestions_scheduler_ = remote_suggestions_scheduler;
|
| + std::unique_ptr<ntp_snippets::RemoteSuggestionsScheduler>
|
| + remote_suggestions_scheduler) {
|
| + remote_suggestions_scheduler_ = std::move(remote_suggestions_scheduler);
|
| }
|
| RemoteSuggestionsScheduler* remote_suggestions_scheduler() {
|
| - return remote_suggestions_scheduler_;
|
| + return remote_suggestions_scheduler_.get();
|
| }
|
|
|
| UserClassifier* user_classifier() { return &user_classifier_; }
|
| @@ -341,8 +342,9 @@ class ContentSuggestionsService : public KeyedService,
|
| RemoteSuggestionsProvider* remote_suggestions_provider_;
|
|
|
| // Interface for informing about external events that have influence on
|
| - // scheduling remote fetches. Not owned.
|
| - RemoteSuggestionsScheduler* remote_suggestions_scheduler_;
|
| + // scheduling remote fetches.
|
| + std::unique_ptr<ntp_snippets::RemoteSuggestionsScheduler>
|
| + remote_suggestions_scheduler_;
|
|
|
| PrefService* pref_service_;
|
|
|
|
|