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

Unified Diff: components/ntp_snippets/remote/ntp_snippet.h

Issue 2616543002: Expose notification info in ContentSuggestion (Closed)
Patch Set: Address comments Created 3 years, 11 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
« no previous file with comments | « components/ntp_snippets/content_suggestion.cc ('k') | components/ntp_snippets/remote/ntp_snippet.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/remote/ntp_snippet.h
diff --git a/components/ntp_snippets/remote/ntp_snippet.h b/components/ntp_snippets/remote/ntp_snippet.h
index 55667423e4d46e2e2979a54a8eafd8716e311699..88c10a07782e4aad5713f4f950d195a22c882937 100644
--- a/components/ntp_snippets/remote/ntp_snippet.h
+++ b/components/ntp_snippets/remote/ntp_snippet.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/time/time.h"
+#include "components/ntp_snippets/content_suggestion.h"
#include "url/gurl.h"
namespace base {
@@ -61,6 +62,9 @@ class NTPSnippet {
// Creates a protocol buffer corresponding to this snippet, for persisting.
SnippetProto ToProto() const;
+ // Coverts to general content suggestion form
+ ContentSuggestion ToContentSuggestion(Category category) const;
+
// Returns all ids of the snippet.
const std::vector<std::string>& GetAllIDs() const { return ids_; }
@@ -105,6 +109,9 @@ class NTPSnippet {
float score() const { return score_; }
+ bool should_notify() const { return should_notify_; }
+ base::Time notification_deadline() const { return notification_deadline_; }
+
bool is_dismissed() const { return is_dismissed_; }
void set_dismissed(bool dismissed) { is_dismissed_ = dismissed; }
@@ -140,6 +147,9 @@ class NTPSnippet {
bool is_dismissed_;
int remote_category_id_;
+ bool should_notify_;
+ base::Time notification_deadline_;
+
DISALLOW_COPY_AND_ASSIGN(NTPSnippet);
};
« no previous file with comments | « components/ntp_snippets/content_suggestion.cc ('k') | components/ntp_snippets/remote/ntp_snippet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698