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 169afc154ded3cf2f0e9d32da806c5c97f65360d..eabac44ac042988c458d991c782a934f512a00c3 100644 |
--- a/components/ntp_snippets/content_suggestions_service.cc |
+++ b/components/ntp_snippets/content_suggestions_service.cc |
@@ -202,6 +202,10 @@ void ContentSuggestionsService::OnNewSuggestions( |
ContentSuggestionsProvider* provider, |
Category category, |
std::vector<ContentSuggestion> suggestions) { |
+ // Providers shouldn't call this when they're in a non-available state. |
+ DCHECK( |
+ IsCategoryStatusInitOrAvailable(provider->GetCategoryStatus(category))); |
+ |
if (TryRegisterProviderForCategory(provider, category)) { |
NotifyCategoryStatusChanged(category); |
} else if (IsCategoryDismissed(category)) { |