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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 1921553004: Add favicon and publisher name to snippet cards (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review comments. Will address test issues in another update. 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: components/ntp_snippets/ntp_snippets_service.cc
diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc
index af047ac3af7da517dda41c378aa711cfd3cecd9c..749dc16e5e41ca99299b89f6fc8d8d2d25c82677 100644
--- a/components/ntp_snippets/ntp_snippets_service.cc
+++ b/components/ntp_snippets/ntp_snippets_service.cc
@@ -145,7 +145,12 @@ bool AddSnippetsFromListValue(const base::ListValue& list,
if (!snippet)
return false;
- snippets->push_back(std::move(snippet));
+// If we're running a release build, only add snippets that have all the
+// data we need to display it properly
+#if !DCHECK_IS_ON()
+ if (snippet->is_complete())
+#endif
+ snippets->push_back(std::move(snippet));
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698