| Index: components/ntp_snippets/remote/remote_suggestions_provider.cc
|
| diff --git a/components/ntp_snippets/remote/remote_suggestions_provider.cc b/components/ntp_snippets/remote/remote_suggestions_provider.cc
|
| index 96ad674507a2fd717ed7800e65764a51e347f6ae..5cead224342f97cd87838927bb2c11115a6edf46 100644
|
| --- a/components/ntp_snippets/remote/remote_suggestions_provider.cc
|
| +++ b/components/ntp_snippets/remote/remote_suggestions_provider.cc
|
| @@ -485,7 +485,8 @@ void RemoteSuggestionsProvider::ClearCachedSuggestions(Category category) {
|
| database_->DeleteImages(GetSnippetIDVector(content->snippets));
|
| content->snippets.clear();
|
|
|
| - NotifyNewSuggestions(category, *content);
|
| + if (IsCategoryStatusAvailable(content->status))
|
| + NotifyNewSuggestions(category, *content);
|
| }
|
|
|
| void RemoteSuggestionsProvider::GetDismissedSuggestionsForDebugging(
|
| @@ -1041,7 +1042,11 @@ void RemoteSuggestionsProvider::FinishInitialization() {
|
| // don't know how long the fetch will take or if it will even complete.
|
| for (const auto& item : category_contents_) {
|
| Category category = item.first;
|
| - NotifyNewSuggestions(category, item.second);
|
| + const CategoryContent& content = item.second;
|
| + // Note: We might be in a non-available status here, e.g. DISABLED due to
|
| + // enterprise policy.
|
| + if (IsCategoryStatusAvailable(content.status))
|
| + NotifyNewSuggestions(category, content);
|
| }
|
| }
|
|
|
|
|