Associate the native- and java AutocompleteMatch objects.
This change enables the native AutocompleteMatch object to create and retain a copy of its corresponding java counterpart. The change essentially shifts code around, moving logic away from AutocompleteController into AutocompleteMatch (both Java and Native). The change optimizes slightly creation of the Java counterparts by retaining an object if it's already created. This comes in handy for every match that is backfilled on every keystroke (about 3 times every time we call AutocompleteController::Start() to get new matches). Java AutocompleteMatch objects are lazily constructed to reduce penalty when native objects end up thrown away -- see: * AutcompleteController#classify(), * AutocompleteController#qualifyPartialUrlQuery() Bug: 1138587 Change-Id: I8c5437cfb0203d5c7f5e1d79747eee3f15b7b0b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538499 Commit-Queue: Tomasz Wiszkowski <ender@google.com> Reviewed-by:Ted Choc <tedchoc@chromium.org> Reviewed-by:
Tommy Li <tommycli@chromium.org> Cr-Commit-Position: refs/heads/master@{#828488}
Showing
This diff is collapsed.
Please register or sign in to comment