Chromium Code Reviews| 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 1b9ecb839cb7d4cedb90f40dc88d6be2ce605fd9..3e52d1311bcece1757be9d202ca6d40c0d57c69a 100644 |
| --- a/components/ntp_snippets/content_suggestions_service.cc |
| +++ b/components/ntp_snippets/content_suggestions_service.cc |
| @@ -48,6 +48,15 @@ CategoryStatus ContentSuggestionsService::GetCategoryStatus( |
| return iterator->second->GetCategoryStatus(category); |
| } |
| +CategoryInfo ContentSuggestionsService::GetCategoryInfo( |
| + Category category) const { |
| + auto iterator = providers_by_category_.find(category); |
| + if (iterator == providers_by_category_.end()) |
| + return CategoryInfo(base::string16()); |
|
PEConn
2016/08/04 12:08:39
What does this represent - an empty category or an
Philipp Keck
2016/08/04 14:17:43
We're discussing the possibility of returning an O
|
| + |
| + return iterator->second->GetCategoryInfo(category); |
| +} |
| + |
| const std::vector<ContentSuggestion>& |
| ContentSuggestionsService::GetSuggestionsForCategory(Category category) const { |
| auto iterator = suggestions_by_category_.find(category); |