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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java

Issue 2640333003: [Downloads UI] Implement search (Closed)
Patch Set: 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
Index: chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
index 5229e987822193cc0e86b26eca9eaba52335435f..d0c6ee86af3d8b0fbcf4dcb80f6f053e5d2564b5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
@@ -347,6 +347,19 @@ public class DownloadHistoryAdapter extends DateDividedAdapter
mObservers.removeObserver(observer);
}
+ void search(String query) {
gone 2017/01/20 20:13:00 Javadoc
Theresa 2017/01/20 21:16:18 Done.
+ mFilteredItems.clear();
+ mRegularDownloadItems.filter(mFilter, query, mFilteredItems);
+ mIncognitoDownloadItems.filter(mFilter, query, mFilteredItems);
+ mOfflinePageItems.filter(mFilter, query, mFilteredItems);
+ clear(false);
+ loadItems(mFilteredItems);
+ }
+
+ void onEndSearch() {
gone 2017/01/20 20:13:00 Guess this is called when a search is canceled?
Theresa 2017/01/20 21:16:18 Yes, when the user hits the navigation back button
+ filter(mFilter);
+ }
+
private DownloadDelegate getDownloadDelegate() {
return mBackendProvider.getDownloadDelegate();
}

Powered by Google App Engine
This is Rietveld 408576698