| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java
|
| index a0190f41f7137b9deb110cbb95d81fa366ea2421..60fe4ed255fa12527d4d9ba8a11ed726cf1944e5 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java
|
| @@ -51,7 +51,7 @@ public class SectionList
|
| SuggestionsSource suggestionsSource = mNewTabPageManager.getSuggestionsSource();
|
| int[] categories = suggestionsSource.getCategories();
|
| int[] suggestionsPerCategory = new int[categories.length];
|
| - int i = 0;
|
| + int categoryIndex = 0;
|
| for (int category : categories) {
|
| int categoryStatus = suggestionsSource.getCategoryStatus(category);
|
| if (categoryStatus == CategoryStatus.LOADING_ERROR
|
| @@ -59,8 +59,11 @@ public class SectionList
|
| || categoryStatus == CategoryStatus.CATEGORY_EXPLICITLY_DISABLED)
|
| continue;
|
|
|
| - suggestionsPerCategory[i++] =
|
| + suggestionsPerCategory[categoryIndex] =
|
| resetSection(category, categoryStatus, alwaysAllowEmptySections);
|
| + SuggestionsSection section = mSections.get(category);
|
| + if (section != null) section.setCategoryRank(categoryIndex + 1);
|
| + ++categoryIndex;
|
| }
|
|
|
| mNewTabPageManager.trackSnippetsPageImpression(categories, suggestionsPerCategory);
|
|
|