[omnibox] Support the the no-default-match case
Currently, AutocompleteResult doesn't really support the no-default-match case. The first match is set to be the default match, even if none of the matches are |allowed_to_be_default_match|. This is problematic, because there's three known cases where there's genuinely no default match: - NTP ZeroSuggest - Enterprise policy where there's no default search provider - ChromeOS launcher ChromeOS launcher already supports the no-default-match case properly. The other two are subtly broken. This CL does two things: - It updates AutocompleteResult to set default_match() == end() when there's no valid default match. - It updates a bunch of logic OmniboxPopupModel (runs on Views and iOS) to support the no-default-match case. Bug: 1016845, 363656 Change-Id: Ib684efba92b05cb677bdabf9265e35e2bfbeab56 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906882 Commit-Queue: Tommy Li <tommycli@chromium.org> Reviewed-by:Justin Donnelly <jdonnelly@chromium.org> Cr-Commit-Position: refs/heads/master@{#714664}
Showing
Please register or sign in to comment