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

Unified Diff: components/ntp_snippets/content_suggestion.h

Issue 2686063003: [remote suggestions] Attach the fetch time to RemoteSnippets, ContentSnippets and SnippetArticle (Closed)
Patch Set: Update RemoteSuggestionTest Created 3 years, 10 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/content_suggestion.h
diff --git a/components/ntp_snippets/content_suggestion.h b/components/ntp_snippets/content_suggestion.h
index b4e64f887dfb53e56081c18f7a463d9f31d4a724..ea17274c45fe2402060c6c2e6830f3b42cbf9390 100644
--- a/components/ntp_snippets/content_suggestion.h
+++ b/components/ntp_snippets/content_suggestion.h
@@ -151,6 +151,11 @@ class ContentSuggestion {
void set_notification_extra(
std::unique_ptr<NotificationExtra> notification_extra);
+ const base::Time& fetch_date() const { return fetch_date_; }
+ void set_fetch_date(const base::Time& fetch_date) {
+ fetch_date_ = fetch_date;
+ }
+
private:
ID id_;
GURL url_;
@@ -163,6 +168,11 @@ class ContentSuggestion {
std::unique_ptr<RecentTabSuggestionExtra> recent_tab_suggestion_extra_;
std::unique_ptr<NotificationExtra> notification_extra_;
+ // The time when the remote suggestion was fetched from the server. This field
+ // is only populated when the ContentSuggestion is created from a
+ // RemoteSuggestion.
+ base::Time fetch_date_;
+
DISALLOW_COPY_AND_ASSIGN(ContentSuggestion);
};

Powered by Google App Engine
This is Rietveld 408576698