Chromium Code Reviews| 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; |
| } |