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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java

Issue 2235463002: Change Snippet layout based on Category. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge in master. Created 4 years, 4 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/cards/SuggestionsSection.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
index 4e4e4f27bf3443a4c4e2cdb0d0a9854acecf4342..edd97047d4c9470b32f2f29600d2ee0daeb9b40c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
@@ -20,7 +20,6 @@ import java.util.List;
*/
public class SuggestionsSection implements ItemGroup {
private final List<SnippetArticleListItem> mSuggestions = new ArrayList<>();
- private final SuggestionsCategoryInfo mInfo;
private final SnippetHeaderListItem mHeader;
private StatusListItem mStatus;
private final ProgressListItem mProgressIndicator = new ProgressListItem();
@@ -29,8 +28,8 @@ public class SuggestionsSection implements ItemGroup {
public SuggestionsSection(int category, List<SnippetArticleListItem> suggestions,
@CategoryStatusEnum int status, SuggestionsCategoryInfo info,
NewTabPageAdapter adapter) {
- mInfo = info;
- mHeader = new SnippetHeaderListItem(mInfo.getTitle());
+
+ mHeader = new SnippetHeaderListItem(info.getTitle());
// TODO(pke): Replace the condition with "info.hasMoreButton()" once all other categories
// are supported by the C++ backend, too.
// Right now, we hard-code all the sections that are handled in ActionListItem.

Powered by Google App Engine
This is Rietveld 408576698