Index: components/ntp_snippets/remote/remote_suggestion.cc |
diff --git a/components/ntp_snippets/remote/remote_suggestion.cc b/components/ntp_snippets/remote/remote_suggestion.cc |
index 988d61a99945dcbdf2d0e273a6908db080d74403..2a478f56f41a161a952f4df2de00cea9ce9e6f46 100644 |
--- a/components/ntp_snippets/remote/remote_suggestion.cc |
+++ b/components/ntp_snippets/remote/remote_suggestion.cc |
@@ -394,6 +394,11 @@ ContentSuggestion RemoteSuggestion::ToContentSuggestion( |
url = amp_url_; |
} |
ContentSuggestion suggestion(category, id(), url); |
+ // If AMP URL is provided as the main URL, we set the non-AMP URL for favicon. |
Marc Treib
2017/04/12 11:48:00
Please describe the "why" rather than the "what".
jkrcal
2017/04/12 12:44:19
Done.
|
+ if (base::FeatureList::IsEnabled(kPreferAmpUrlsFeature) && |
+ !amp_url_.is_empty()) { |
+ suggestion.set_url_with_favicon(url_); |
+ } |
suggestion.set_title(base::UTF8ToUTF16(title_)); |
suggestion.set_snippet_text(base::UTF8ToUTF16(snippet_)); |
suggestion.set_publish_date(publish_date_); |