[omnibox]: Dedupe bookmark provider classification.
This is the 15th refactoring CL aimed at reducing duplication and inconsistency for classifying omnibox results. Bookmark providers compare the user and suggest texts and find the corresponding matches during construction in 'TitledUrlIndex::AddMatchToResults'. These are then used for both scoring and classification. With this CL, bookmark classification uses the 'FindTermMatches' and 'ClassifyTermMatches' methods that other providers use. This improves consistency with other providers at the cost of inconsistency with the bookmark provider's scoring. The most prominent distinction is prefix matching; where if the user input is an exact prefix of the suggestion text, subsequent matching words in the suggestion text are not bolded. E.g., before this CL, the user text 'the' would match the bookmark suggestion '[the] cake ate [the] moon'; whereas with this CL, it will match only the first occurrence of 'the', '[the] cake ate the moon'. Re consistency with other providers: A user may see suggestions from different providers with similar texts. E.g., the user input 'the' could provide both search and bookmark suggestions with texts 'the cake ate the moon'. It would be surprising if such suggestions with the same text were bolded differently; e.g. the search suggestion were bolded '[the] cake ate the moon', whereas the bookmark suggestion was bolded '[the] cake ate [the] moon'. Re inconsistency with bookmark provider's scoring: Bookmark scoring does not consider prefixes specially and all occurrences of the user input contribute to the score. Not bolding subsequent occurrences suggests otherwise. E.g., the user input 'the' could display two bookmark suggestions '[the] cake ate the moon' and '[the] cake ate a moon', and the first would be scored higher because it contains a second occurrence of 'the'. In addition to a change in prefix bolding this CL has some other minor side affects on bolding regarding word-separators and matching input words shorter than 3 characters incompletely with suggestion words. E.g., the user input 'the' (3 characters) previously matched '[the]' and '[the]re', but 'th' (shorter than 3 characters) only matched '[th]' (complete match) but not 'the' or 'there' (incomplete matches). Bug: 366623 Change-Id: Ifc08aae00359be2669b05189e249d531ed3dabf1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1588554 Commit-Queue: manuk hovanesian <manukh@chromium.org> Reviewed-by:Tommy Li <tommycli@chromium.org> Cr-Commit-Position: refs/heads/master@{#664441}
Showing
Please register or sign in to comment