| 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 5cd19fd2c70fd03eee9b33759ee80ec3a1c7c29f..74d58f16eea93535afbafdfcf0f2a244bb5f59a6 100644
|
| --- a/components/ntp_snippets/content_suggestions_service.cc
|
| +++ b/components/ntp_snippets/content_suggestions_service.cc
|
| @@ -29,7 +29,8 @@ ContentSuggestionsService::ContentSuggestionsService(
|
| : state_(state),
|
| signin_observer_(this),
|
| history_service_observer_(this),
|
| - ntp_snippets_service_(nullptr),
|
| + remote_suggestions_provider_(nullptr),
|
| + persistent_scheduler_listener_(nullptr),
|
| pref_service_(pref_service),
|
| user_classifier_(pref_service) {
|
| // Can be null in tests.
|
| @@ -47,7 +48,8 @@ ContentSuggestionsService::ContentSuggestionsService(
|
| ContentSuggestionsService::~ContentSuggestionsService() = default;
|
|
|
| void ContentSuggestionsService::Shutdown() {
|
| - ntp_snippets_service_ = nullptr;
|
| + remote_suggestions_provider_ = nullptr;
|
| + persistent_scheduler_listener_ = nullptr;
|
| suggestions_by_category_.clear();
|
| providers_by_category_.clear();
|
| categories_.clear();
|
| @@ -223,6 +225,12 @@ void ContentSuggestionsService::Fetch(
|
| providers_it->second->Fetch(category, known_suggestion_ids, callback);
|
| }
|
|
|
| +void ContentSuggestionsService::ReloadSuggestions() {
|
| + for (const auto& category_provider_pair : providers_by_category_) {
|
| + category_provider_pair.second->ReloadSuggestions();
|
| + }
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // Private methods
|
|
|
|
|