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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/BookmarksBridge.java

Issue 1184613002: [Android] Remove search feature from enhanced bookmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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/java/src/org/chromium/chrome/browser/enhanced_bookmarks/EnhancedBookmarksBridge.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/BookmarksBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BookmarksBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/BookmarksBridge.java
index 8a99e1146d81f8a5cb56e5d5e013d153e0e31a86..068a5e1fd937b4136eb41dffe5dfb8079bc641ca 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/BookmarksBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/BookmarksBridge.java
@@ -4,14 +4,11 @@
package org.chromium.chrome.browser;
-import android.util.Pair;
-
import org.chromium.base.CalledByNative;
import org.chromium.base.ObserverList;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.components.bookmarks.BookmarkId;
-import org.chromium.components.bookmarks.BookmarkMatch;
import org.chromium.components.bookmarks.BookmarkType;
import java.util.ArrayList;
@@ -379,19 +376,6 @@ public class BookmarksBridge {
}
/**
- * Synchronously gets a list of bookmarks that match the specified search query.
- * @param query Keyword used for searching bookmarks.
- * @param maxNumberOfResult Maximum number of result to fetch.
- * @return List of bookmarks that are related to the given query.
- */
- public List<BookmarkMatch> searchBookmarks(String query, int maxNumberOfResult) {
- List<BookmarkMatch> bookmarkMatches = new ArrayList<BookmarkMatch>();
- nativeSearchBookmarks(mNativeBookmarksBridge, bookmarkMatches, query,
- maxNumberOfResult);
- return bookmarkMatches;
- }
-
- /**
* Set title of the given bookmark.
*/
public void setBookmarkTitle(BookmarkId id, String title) {
@@ -684,24 +668,6 @@ public class BookmarksBridge {
}
@CalledByNative
- private static void addToBookmarkMatchList(List<BookmarkMatch> bookmarkMatchList,
- long id, int type, int[] titleMatchStartPositions,
- int[] titleMatchEndPositions, int[] urlMatchStartPositions,
- int[] urlMatchEndPositions) {
- bookmarkMatchList.add(new BookmarkMatch(new BookmarkId(id, type),
- createPairsList(titleMatchStartPositions, titleMatchEndPositions),
- createPairsList(urlMatchStartPositions, urlMatchEndPositions)));
- }
-
- private static List<Pair<Integer, Integer>> createPairsList(int[] left, int[] right) {
- List<Pair<Integer, Integer>> pairList = new ArrayList<Pair<Integer, Integer>>();
- for (int i = 0; i < left.length; i++) {
- pairList.add(new Pair<Integer, Integer>(left[i], right[i]));
- }
- return pairList;
- }
-
- @CalledByNative
private static void addToBookmarkIdListWithDepth(List<BookmarkId> folderList, long id,
int type, List<Integer> depthList, int depth) {
folderList.add(new BookmarkId(id, type));
@@ -746,8 +712,6 @@ public class BookmarksBridge {
private native void nativeDeleteBookmark(long nativeBookmarksBridge, BookmarkId bookmarkId);
private native void nativeMoveBookmark(long nativeBookmarksBridge, BookmarkId bookmarkId,
BookmarkId newParentId, int index);
- private native void nativeSearchBookmarks(long nativeBookmarksBridge,
- List<BookmarkMatch> bookmarkMatches, String query, int maxNumber);
private native BookmarkId nativeAddBookmark(long nativeBookmarksBridge, BookmarkId parent,
int index, String title, String url);
private native void nativeUndo(long nativeBookmarksBridge);
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/enhanced_bookmarks/EnhancedBookmarksBridge.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698