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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java

Issue 2686063003: [remote suggestions] Attach the fetch time to RemoteSnippets, ContentSnippets and SnippetArticle (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java
index f3d6805d2e2b7a95a605994ff8beac62b750b2fb..6b35c3400c9163595ae1ad5479b0325f28fc2ff9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java
@@ -36,6 +36,12 @@ public class SnippetArticle {
/** The score expressing relative quality of the article for the user. */
public final float mScore;
+ /**
+ * The time when the article was fetched from the server. This field is only used for remote
+ * suggestions.
+ */
+ public final long mFetchTimestampMilliseconds;
+
/** The rank of this article within its section. */
private int mPerSectionRank = -1;
@@ -67,15 +73,17 @@ public class SnippetArticle {
* Creates a SnippetArticleListItem object that will hold the data.
*/
public SnippetArticle(int category, String idWithinCategory, String title, String publisher,
- String previewText, String url, long timestamp, float score) {
+ String previewText, String url, long publishTimestamp, float score,
+ long fetchTimestamp) {
mCategory = category;
mIdWithinCategory = idWithinCategory;
mTitle = title;
mPublisher = publisher;
mPreviewText = previewText;
mUrl = url;
- mPublishTimestampMilliseconds = timestamp;
+ mPublishTimestampMilliseconds = publishTimestamp;
mScore = score;
+ mFetchTimestampMilliseconds = fetchTimestamp;
}
@Override
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698