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

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

Issue 1996473002: Track age and score of snippets that are clicked (along with position). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After code review #3 Created 4 years, 7 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 d8f7a29f1e422ed1007dc88ff5a4f21ab9e5aa57..c4ef6231b4b10765dedc24b43069edae62be04c7 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
@@ -19,6 +19,7 @@ public class SnippetArticle implements NewTabPageListItem {
public final String mAmpUrl;
public final String mThumbnailUrl;
public final long mTimestamp;
+ public final float mScore;
public final int mPosition;
/** Bitmap of the thumbnail, fetched lazily, when the RecyclerView wants to show the snippet. */
@@ -33,10 +34,11 @@ public class SnippetArticle implements NewTabPageListItem {
* @param mAmpUrl the AMP url for the article (possible for this to be empty)
* @param thumbnailUrl the URL of the thumbnail
* @param timestamp the time in ms when this article was published
+ * @param score the score expressing relative quality of the article for the user
* @param position the position of this article in the list of snippets
*/
public SnippetArticle(String id, String title, String publisher, String previewText, String url,
- String ampUrl, String thumbnailUrl, long timestamp, int position) {
+ String ampUrl, String thumbnailUrl, long timestamp, float score, int position) {
mId = id;
mTitle = title;
mPublisher = publisher;
@@ -45,6 +47,7 @@ public class SnippetArticle implements NewTabPageListItem {
mAmpUrl = ampUrl;
mThumbnailUrl = thumbnailUrl;
mTimestamp = timestamp;
+ mScore = score;
mPosition = position;
}

Powered by Google App Engine
This is Rietveld 408576698