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

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: 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: 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..85dba34874af4baf1c2e2c4ac93a75417e4a9150 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;
Marc Treib 2017/02/13 15:20:31 s/Long/long/ ?
markusheintz_ 2017/02/13 15:55:01 Done.
+
/** 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

Powered by Google App Engine
This is Rietveld 408576698