DescriptionOmnibox: Fix URL-What-You-Typed Allowed-To-Be-Default-Match Issues
The two linked bugs both describe situations where the user types
a URL but that URL does not appear first because the top-scoring
provider that returned the URL set it incorrectly as not allowed to
be the default match.
This changes fixes those issues by making providers (namely
HistoryQuick, Search, and Shortcuts) mark a match as
allowed_to_be_default_match if it is UWYT match for this input, or (even
if not identical) it would be dedupped against the UWYT match.
The changes to HistoryQuick and Search fix the attached
bugs. Shortcuts does the identical part of the test, not the de-dupping part
of the test. The Shortcuts change to handle dedupping is not to fix a
known bug; rather it's simply to make Shortcuts behave as it should
and in parallel with the other providers.
I don't think changes in other providers beyond these three are
necessary.
This change necessitated some changes to AutocompleteMatch to make a
statically-available version of ComputeStrippedDestinationURL() so we
can strip URLs (such as the UWYT URL) that isn't going to be a
AutocompleteMatch in the relevant provider.
Also removes the IsInlineable() function in BaseSearchProvider::Result,
which is only used in one place and not actually necessary in that place.
(It's computing the same thing that code there is already computing.)
BUG=383065, 388397
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282669
Patch Set 1 #Patch Set 2 : polish #
Total comments: 16
Patch Set 3 : Peter's comments, minus getting rid of Profile #Patch Set 4 : rebase and make compile; not re-tested #Patch Set 5 : refactor to add common function, plus add tests #Patch Set 6 : remove extra << #
Total comments: 14
Patch Set 7 : Peter's comments #Patch Set 8 : remove some test cases; add dcheck #
Total comments: 4
Patch Set 9 : Peter's comments #Patch Set 10 : rebase #Patch Set 11 : fix crashes on about: schemes #Messages
Total messages: 22 (0 generated)
|