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

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: Change unit test to use non-C++ 11 STL functions Created 4 years, 7 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
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.cc ('k') | components/ntp_snippets/ntp_snippet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c2f44f49cda726ccd2e9a76fad54db0d41cecfa2..45d30e23d9176985afe26428309d0cce8151032e 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)
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.cc ('k') | components/ntp_snippets/ntp_snippet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698