Handle notificationInfo |
|||||
Issue description
Remote content suggestions now optionally have fields for notification information. They look something like:
{
…,
"notificationInfo": {
"shouldNotify": true,
"deadline": "2016-12-31T00:00:00Z", (Maybe. Will match other timestamp fields)
}
}
We need three things:
1. ContentSuggestion should expose this information.
2. It should be persisted to the database.
3. Suggestions with this information should be ordered before other suggestions.
,
Dec 21 2016
,
Dec 22 2016
,
Dec 22 2016
,
Jan 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a588fa5a67e9f1c24326ae6f0b2475e1bb1e8d5f commit a588fa5a67e9f1c24326ae6f0b2475e1bb1e8d5f Author: sfiera <sfiera@chromium.org> Date: Thu Jan 05 14:47:38 2017 Expose notification info in ContentSuggestion Add ContentSuggestion::notification_extra(), set when we should notify. Set it based on notificationInfo from the JSON response. For the sake of the test, move the code to convert NTPSnippet to ContentSuggestion in NTPSnippet itself. BUG= 675961 Review-Url: https://codereview.chromium.org/2616543002 Cr-Commit-Position: refs/heads/master@{#441653} [modify] https://crrev.com/a588fa5a67e9f1c24326ae6f0b2475e1bb1e8d5f/components/ntp_snippets/content_suggestion.cc [modify] https://crrev.com/a588fa5a67e9f1c24326ae6f0b2475e1bb1e8d5f/components/ntp_snippets/content_suggestion.h [modify] https://crrev.com/a588fa5a67e9f1c24326ae6f0b2475e1bb1e8d5f/components/ntp_snippets/remote/ntp_snippet.cc [modify] https://crrev.com/a588fa5a67e9f1c24326ae6f0b2475e1bb1e8d5f/components/ntp_snippets/remote/ntp_snippet.h [modify] https://crrev.com/a588fa5a67e9f1c24326ae6f0b2475e1bb1e8d5f/components/ntp_snippets/remote/ntp_snippet_unittest.cc [modify] https://crrev.com/a588fa5a67e9f1c24326ae6f0b2475e1bb1e8d5f/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc
,
Jan 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6f439cbe3aed0f47ed16c82a5f28e51c87a69a72 commit 6f439cbe3aed0f47ed16c82a5f28e51c87a69a72 Author: sfiera <sfiera@chromium.org> Date: Fri Jan 06 17:10:09 2017 Group content suggestions notifications separately Without this, the notification could get grouped with one of the other types of Chrome notifications. BUG= 675961 Review-Url: https://codereview.chromium.org/2618733003 Cr-Commit-Position: refs/heads/master@{#441955} [modify] https://crrev.com/6f439cbe3aed0f47ed16c82a5f28e51c87a69a72/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java
,
Jan 6 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by sfiera@chromium.org
, Dec 20 2016