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

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: 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..9d5337fcdbebd2ada3495344e0cc6181fa065329 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
Marc Treib 2016/04/27 07:03:09 I dislike this very much - IMO doing stuff differe
May 2016/04/27 16:45:09 I had a long internal debate about this. Basically
Marc Treib 2016/04/28 08:50:13 IMO a cmdline flag for devs would be better, yes.
May 2016/04/28 18:01:52 Ok, I'll do a cmd line flag. I really want it to b
Bernhard Bauer 2016/04/29 09:26:34 Just as a suggestion (and to add my opinion about
May 2016/04/29 17:00:14 Yeah, that would be a nice additional feature thou
+#if !DCHECK_IS_ON()
+ if (snippet->is_valid_snippet())
+#endif
+ snippets->push_back(std::move(snippet));
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698