Messages pushed from the server should either contain the payload of the content suggestion or a push-to-refresh message to direct the client to initiate a background fetch.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5ea174928fb6899c8fd56afa874899d7c3243690 commit 5ea174928fb6899c8fd56afa874899d7c3243690 Author: Mohamed Amir Yosef <mamir@chromium.org> Date: Wed Oct 25 16:51:49 2017 [NTP::Push] Add support for push-to-refresh messages Before this CL: Push messages contained only the payload of the content suggestion. After this CL: A new "action" field is added to the pushed message. If (action == "push-by-value"), the content is read from the payload. If (action == "push-to-refresh"), a background fetch is triggered instead. Bug: 776372 Change-Id: Iee42e9eecbf373c8323bebcd18a43e74201385d6 Reviewed-on: https://chromium-review.googlesource.com/727896 Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org> Reviewed-by: Robert Kaplow <rkaplow@chromium.org> Reviewed-by: vitaliii <vitaliii@chromium.org> Cr-Commit-Position: refs/heads/master@{#511490} [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/components/ntp_snippets/breaking_news/breaking_news_gcm_app_handler.cc [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/components/ntp_snippets/breaking_news/breaking_news_gcm_app_handler.h [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/components/ntp_snippets/breaking_news/breaking_news_gcm_app_handler_unittest.cc [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/components/ntp_snippets/breaking_news/breaking_news_listener.h [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/components/ntp_snippets/breaking_news/breaking_news_metrics.cc [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/components/ntp_snippets/breaking_news/breaking_news_metrics.h [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/components/ntp_snippets/remote/remote_suggestions_provider_impl.h [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/tools/metrics/histograms/enums.xml [modify] https://crrev.com/5ea174928fb6899c8fd56afa874899d7c3243690/tools/metrics/histograms/histograms.xml
Comment 1 by fhorschig@chromium.org
, Oct 20 2017