Chromium Code Reviews| Index: components/ntp_snippets/remote/remote_suggestions_provider_impl.cc |
| diff --git a/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc b/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc |
| index 2763aa4762c4d3848eb37f327fb0474fdd7576d5..9e0c3da9986c0fb27e67538b66bf5ea70a931d49 100644 |
| --- a/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc |
| +++ b/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc |
| @@ -339,6 +339,20 @@ RemoteSuggestionsProviderImpl::suggestions_fetcher_for_debugging() const { |
| return suggestions_fetcher_.get(); |
| } |
| +GURL RemoteSuggestionsProviderImpl::GetUrlWithFavicon( |
| + const ContentSuggestion::ID& suggestion_id) const { |
| + DCHECK(base::ContainsKey(category_contents_, suggestion_id.category())); |
| + |
| + const CategoryContent& content = |
| + category_contents_.at(suggestion_id.category()); |
| + const RemoteSuggestion* suggestion = |
| + content.FindSuggestion(suggestion_id.id_within_category()); |
| + if (!suggestion) { |
| + return GURL(); |
| + } |
| + return suggestion->url().GetWithEmptyPath(); |
|
vitaliii
2017/04/21 11:09:11
This duplicates logic in ContentSuggestion.
Should
jkrcal
2017/04/21 13:30:54
Done (similarly).
|
| +} |
| + |
| void RemoteSuggestionsProviderImpl::FetchSuggestions( |
| bool interactive_request, |
| const FetchStatusCallback& callback) { |