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

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

Issue 2244793002: Remove deleted offline page suggestions from opened NTPs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 edd97047d4c9470b32f2f29600d2ee0daeb9b40c..dc493d830fca267b45dd73a938e08e3673acd554 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
@@ -61,6 +61,15 @@ public class SuggestionsSection implements ItemGroup {
mSuggestions.remove(suggestion);
}
+ public void removeSuggestionById(String suggestionId) {
Michael van Ouwerkerk 2016/08/15 11:06:09 This method is called |removeSuggestion| and the o
Philipp Keck 2016/08/16 10:54:40 Right. They should both be "removeSuggestion", as
+ for (SnippetArticleListItem suggestion : mSuggestions) {
+ if (suggestion.mId.equals(suggestionId)) {
+ mSuggestions.remove(suggestion);
+ return;
+ }
+ }
+ }
+
public boolean hasSuggestions() {
return !mSuggestions.isEmpty();
}

Powered by Google App Engine
This is Rietveld 408576698