| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import org.chromium.base.CalledByNative; | 7 import org.chromium.base.CalledByNative; |
| 8 import org.chromium.base.ObserverList; | 8 import org.chromium.base.ObserverList; |
| 9 import org.chromium.base.VisibleForTesting; | 9 import org.chromium.base.VisibleForTesting; |
| 10 import org.chromium.chrome.browser.profiles.Profile; | 10 import org.chromium.chrome.browser.profiles.Profile; |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 * @return BookmarkId of the child, which will be null if folderId does not
point to a folder or | 356 * @return BookmarkId of the child, which will be null if folderId does not
point to a folder or |
| 357 * index is invalid. | 357 * index is invalid. |
| 358 */ | 358 */ |
| 359 public BookmarkId getChildAt(BookmarkId folderId, int index) { | 359 public BookmarkId getChildAt(BookmarkId folderId, int index) { |
| 360 assert mIsNativeBookmarkModelLoaded; | 360 assert mIsNativeBookmarkModelLoaded; |
| 361 return nativeGetChildAt(mNativeBookmarksBridge, folderId.getId(), folder
Id.getType(), | 361 return nativeGetChildAt(mNativeBookmarksBridge, folderId.getId(), folder
Id.getType(), |
| 362 index); | 362 index); |
| 363 } | 363 } |
| 364 | 364 |
| 365 /** | 365 /** |
| 366 * @return All bookmark IDs ordered by descending creation date. | 366 * @return All bookmark IDs ordered by descending creation date. Partner/man
aged bookmarks are |
| 367 * not included. |
| 367 */ | 368 */ |
| 368 public List<BookmarkId> getAllBookmarkIDsOrderedByCreationDate() { | 369 public List<BookmarkId> getAllBookmarkIDsOrderedByCreationDate() { |
| 369 assert mIsNativeBookmarkModelLoaded; | 370 assert mIsNativeBookmarkModelLoaded; |
| 370 List<BookmarkId> result = new ArrayList<BookmarkId>(); | 371 List<BookmarkId> result = new ArrayList<BookmarkId>(); |
| 371 nativeGetAllBookmarkIDsOrderedByCreationDate(mNativeBookmarksBridge, res
ult); | 372 nativeGetAllBookmarkIDsOrderedByCreationDate(mNativeBookmarksBridge, res
ult); |
| 372 return result; | 373 return result; |
| 373 } | 374 } |
| 374 | 375 |
| 375 /** | 376 /** |
| 376 * Synchronously gets a list of bookmarks that match the specified search qu
ery. | 377 * Synchronously gets a list of bookmarks that match the specified search qu
ery. |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 case GET_CURRENT_FOLDER_HIERARCHY: | 802 case GET_CURRENT_FOLDER_HIERARCHY: |
| 802 mHandler.getCurrentFolderHierarchy(mFolderId, mCallback); | 803 mHandler.getCurrentFolderHierarchy(mFolderId, mCallback); |
| 803 break; | 804 break; |
| 804 default: | 805 default: |
| 805 assert false; | 806 assert false; |
| 806 break; | 807 break; |
| 807 } | 808 } |
| 808 } | 809 } |
| 809 } | 810 } |
| 810 } | 811 } |
| OLD | NEW |