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 43ee91ef2542ea02ef3d1af0723761ffe8b84ee5..98e9a8dd81f02d4e4652b706396ea5d62ba816ee 100644 |
| --- a/components/ntp_snippets/content_suggestions_service.cc |
| +++ b/components/ntp_snippets/content_suggestions_service.cc |
| @@ -50,6 +50,16 @@ CategoryStatus ContentSuggestionsService::GetCategoryStatus( |
| return iterator->second->GetCategoryStatus(category); |
| } |
| +CategoryInfo ContentSuggestionsService::GetCategoryInfo( |
|
Marc Treib
2016/08/08 14:11:26
Didn't we agree on returning a base::Optional?
Philipp Keck
2016/08/08 14:50:18
Done.
|
| + Category category) const { |
| + auto iterator = providers_by_category_.find(category); |
| + if (iterator == providers_by_category_.end()) |
|
Marc Treib
2016/08/08 14:11:26
Braces if the body doesn't fit on one line
Philipp Keck
2016/08/08 14:50:18
Done.
That's one of the many reasons why I'd alwa
|
| + return CategoryInfo(base::string16(), |
| + ContentSuggestionsCardLayout::FULL_CARD); |
| + |
| + return iterator->second->GetCategoryInfo(category); |
| +} |
| + |
| const std::vector<ContentSuggestion>& |
| ContentSuggestionsService::GetSuggestionsForCategory(Category category) const { |
| auto iterator = suggestions_by_category_.find(category); |