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 fbfa26715ce5bd97f7bebc56664d7de8575dfee1..43dddc17cc31af214d386e53b1e24e5268a4191f 100644 |
--- a/components/ntp_snippets/content_suggestions_service.cc |
+++ b/components/ntp_snippets/content_suggestions_service.cc |
@@ -30,7 +30,8 @@ ContentSuggestionsService::ContentSuggestionsService( |
: state_(state), |
signin_observer_(this), |
history_service_observer_(this), |
- ntp_snippets_service_(nullptr), |
+ remote_suggestions_provider_(nullptr), |
+ remote_suggestions_scheduler_(nullptr), |
pref_service_(pref_service), |
user_classifier_(pref_service), |
category_ranker_(std::move(category_ranker)) { |
@@ -49,7 +50,8 @@ ContentSuggestionsService::ContentSuggestionsService( |
ContentSuggestionsService::~ContentSuggestionsService() = default; |
void ContentSuggestionsService::Shutdown() { |
- ntp_snippets_service_ = nullptr; |
+ remote_suggestions_provider_ = nullptr; |
+ remote_suggestions_scheduler_ = nullptr; |
suggestions_by_category_.clear(); |
providers_by_category_.clear(); |
categories_.clear(); |
@@ -234,6 +236,12 @@ void ContentSuggestionsService::Fetch( |
providers_it->second->Fetch(category, known_suggestion_ids, callback); |
} |
+void ContentSuggestionsService::ReloadSuggestions() { |
+ for (const auto& provider : providers_) { |
+ provider->ReloadSuggestions(); |
+ } |
+} |
+ |
//////////////////////////////////////////////////////////////////////////////// |
// Private methods |