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

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

Issue 2162093002: Rename SnippetArticle to SnippetArticleListItem for consistency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/SnippetArticleListItem.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/SnippetArticleListItem.java
similarity index 89%
rename from chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java
rename to chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticleListItem.java
index c105529cbff3a10d2bc2972fd6cbc83dcf692b26..9c781904fdc7ad39fe834a7a89c9a3e9bf461fd5 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/SnippetArticleListItem.java
@@ -13,7 +13,7 @@
/**
* Represents the data for an article card on the NTP.
*/
-public class SnippetArticle implements NewTabPageListItem {
+public class SnippetArticleListItem implements NewTabPageListItem {
public final String mId;
public final String mTitle;
public final String mPublisher;
@@ -35,19 +35,20 @@
private static final int[] HISTOGRAM_FOR_POSITIONS = {0, 2, 4, 9};
/**
- * Creates a SnippetArticle object that will hold the data
+ * Creates a SnippetArticleListItem object that will hold the data.
* @param title the title of the article
* @param publisher the canonical publisher name (e.g., New York Times)
* @param previewText the snippet preview text
* @param url the URL of the article
- * @param mAmpUrl the AMP url for the article (possible for this to be empty)
+ * @param ampUrl 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, float score, int position) {
+ public SnippetArticleListItem(String id, String title, String publisher, String previewText,
+ String url, String ampUrl, String thumbnailUrl, long timestamp, float score,
+ int position) {
mId = id;
mTitle = title;
mPublisher = publisher;
@@ -62,8 +63,8 @@ public SnippetArticle(String id, String title, String publisher, String previewT
@Override
public boolean equals(Object other) {
- if (!(other instanceof SnippetArticle)) return false;
- return mId.equals(((SnippetArticle) other).mId);
+ if (!(other instanceof SnippetArticleListItem)) return false;
+ return mId.equals(((SnippetArticleListItem) other).mId);
}
@Override
@@ -108,7 +109,7 @@ public void trackImpression() {
mImpressionTracked = true;
}
- /** Returns whether impression of this SnippetArticle has already been tracked. */
+ /** Returns whether impression of this SnippetArticleListItem has already been tracked. */
public boolean impressionTracked() {
return mImpressionTracked;
}

Powered by Google App Engine
This is Rietveld 408576698