Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: components/ntp_snippets/remote/remote_suggestions_provider_impl.cc

Issue 2829963005: [Remote suggestions] Get favicon URLs from archive (Closed)
Patch Set: Tim's comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698