Index: chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java |
index 417c43a2a1dc082f817ef1e67f5266fb08b66577..28a74212bf638fafc35cedac13a7c64b79bf9873 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java |
@@ -481,10 +481,10 @@ public class BookmarkBridge { |
* 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. |
+ * @return List of bookmark IDs that are related to the given query. |
*/ |
- public List<BookmarkMatch> searchBookmarks(String query, int maxNumberOfResult) { |
- List<BookmarkMatch> bookmarkMatches = new ArrayList<BookmarkMatch>(); |
+ public List<BookmarkId> searchBookmarks(String query, int maxNumberOfResult) { |
+ List<BookmarkId> bookmarkMatches = new ArrayList<BookmarkId>(); |
nativeSearchBookmarks(mNativeBookmarkBridge, bookmarkMatches, query, |
maxNumberOfResult); |
return bookmarkMatches; |
@@ -810,16 +810,6 @@ public class BookmarkBridge { |
depthList.add(depth); |
} |
- @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++) { |
@@ -911,7 +901,7 @@ public class BookmarkBridge { |
private native void nativeEndGroupingUndos(long nativeBookmarkBridge); |
private native void nativeLoadEmptyPartnerBookmarkShimForTesting(long nativeBookmarkBridge); |
private native void nativeSearchBookmarks(long nativeBookmarkBridge, |
- List<BookmarkMatch> bookmarkMatches, String query, int maxNumber); |
+ List<BookmarkId> bookmarkMatches, String query, int maxNumber); |
private native long nativeInit(Profile profile); |
private native boolean nativeIsDoingExtensiveChanges(long nativeBookmarkBridge); |
private native void nativeDestroy(long nativeBookmarkBridge); |