Commit 28225aec authored by Orin Jaworski's avatar Orin Jaworski Committed by Commit Bot

[omnibox] Fix buried Pedals by moving from duplicates to surface match

This CL resolves the occasional case of disappearing Pedals. If a pedal
is attached to a match that then becomes a duplicate, the remaining
surface match will not have a pedal because only one is allowed in the
whole set. In such cases, moving the pedal from the duplicate to the
main surface match will preserve the pedal for presentation.

Bug: 1118126
Change-Id: Ie25d6634f4face69e102521510d983ea5a723b5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363872
Auto-Submit: Orin Jaworski <orinj@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Orin Jaworski <orinj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799671}
parent b7cd482c
...@@ -1132,6 +1132,11 @@ void AutocompleteMatch::UpgradeMatchWithPropertiesFrom( ...@@ -1132,6 +1132,11 @@ void AutocompleteMatch::UpgradeMatchWithPropertiesFrom(
RecordAdditionalInfo(kACMatchPropertyScoreBoostedFrom, relevance); RecordAdditionalInfo(kACMatchPropertyScoreBoostedFrom, relevance);
relevance = duplicate_match.relevance; relevance = duplicate_match.relevance;
} }
// Take the |pedal|, if any, so that it will be presented instead of buried.
if (!pedal && duplicate_match.pedal) {
pedal = duplicate_match.pedal;
}
} }
void AutocompleteMatch::TryAutocompleteWithTitle( void AutocompleteMatch::TryAutocompleteWithTitle(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment