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

Unified Diff: chrome/browser/ui/webui/snippets_internals_message_handler.cc

Issue 1921553004: Add favicon and publisher name to snippet cards (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: chrome/browser/ui/webui/snippets_internals_message_handler.cc
diff --git a/chrome/browser/ui/webui/snippets_internals_message_handler.cc b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
index e7a7d233aa0a78c3a02fd25c7016b23abb2106f1..4e3aae94935fd262639feeac1bca961ba460d786 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
@@ -36,14 +36,14 @@ std::unique_ptr<base::DictionaryValue> PrepareSnippet(
bool discarded) {
std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue);
entry->SetString("title", snippet.title());
- entry->SetString("siteTitle", snippet.site_title());
+ entry->SetString("siteTitle", snippet.best_source().publisher_name);
entry->SetString("snippet", snippet.snippet());
entry->SetString("published",
TimeFormatShortDateAndTime(snippet.publish_date()));
entry->SetString("expires",
TimeFormatShortDateAndTime(snippet.expiry_date()));
entry->SetString("url", snippet.url().spec());
- entry->SetString("faviconUrl", snippet.favicon_url().spec());
+ entry->SetString("ampUrl", snippet.best_source().amp_url.spec());
entry->SetString("salientImageUrl", snippet.salient_image_url().spec());
if (discarded)

Powered by Google App Engine
This is Rietveld 408576698