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

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

Issue 2650213004: [Android NTP] Notify about correct number of removed suggestions when clearing all but first N noti… (Closed)
Patch Set: sync Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SectionListTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4d8dee5504b90f1a5b3336fba3a29941a2ba7873..850fec8fcea53163452aeb9a6419d2761f49c167 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
@@ -6,7 +6,6 @@ package org.chromium.chrome.browser.ntp.cards;
import org.chromium.base.Callback;
import org.chromium.base.Log;
-import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.ntp.NewTabPage.DestructionObserver;
import org.chromium.chrome.browser.ntp.NewTabPageUma;
import org.chromium.chrome.browser.ntp.snippets.CategoryInt;
@@ -152,7 +151,7 @@ public class SuggestionsSection extends InnerNode {
int itemCount = mSuggestions.size();
if (itemCount > n) {
mSuggestions.subList(n, itemCount).clear();
- notifyItemRangeRemoved(n, itemCount - 1);
+ notifyItemRangeRemoved(n, itemCount - n);
}
}
@@ -474,21 +473,11 @@ public class SuggestionsSection extends InnerNode {
return mHeader.getHeaderText();
}
- /**
- * @return The progress indicator.
- */
- @VisibleForTesting
ProgressItem getProgressItemForTesting() {
return mProgressIndicator;
}
- @VisibleForTesting
- ActionItem getActionItem() {
+ ActionItem getActionItemForTesting() {
return mMoreButton;
}
-
- @VisibleForTesting
- StatusItem getStatusItem() {
- return mStatus;
- }
}
« no previous file with comments | « no previous file | chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SectionListTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698