[omnibox] Fix bug: All matches culled if none allowed to be default
In the status quo, all matches are culled if none of them have allowed_to_be_default_match() true. That's a bug, because there's legitimate exotic situations where truly none of the matches should be pre-selected: - DefaultSearchProviderEnabled policy == false - NTP on-focus suggestions (Enter should do nothing) It also removes a DCHECK that's not true. The DCHECK assumes that this can only occur for NTP on-focus suggestions. This also can occur for Enterprises that have disallowed by policy the default search provider. Note: Since we previously just culled all matches in the none-allowed-default case, it probably papered over some bugs. This CL is likely to expose those bugs, but I intend to fix them all as soon as we find them. If there's a crash bisected to this CL, don't revert this CL, message me instead. Bug: 1016845, 363656 Change-Id: I5b4333d3260f21d65500a5e49e3a5b77cd0735ff Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872485 Commit-Queue: Tommy Li <tommycli@chromium.org> Reviewed-by:Kevin Bailey <krb@chromium.org> Cr-Commit-Position: refs/heads/master@{#709656}
Showing
Please register or sign in to comment