Chromium Code Reviews| Index: components/omnibox/base_search_provider.cc |
| diff --git a/components/omnibox/base_search_provider.cc b/components/omnibox/base_search_provider.cc |
| index dfc26a59a207d966a01a27a120d3e35e4ece90bc..a0db8f34cb1a70471adb54d449a706455208b17e 100644 |
| --- a/components/omnibox/base_search_provider.cc |
| +++ b/components/omnibox/base_search_provider.cc |
| @@ -420,6 +420,14 @@ void BaseSearchProvider::AddMatchToMap( |
| i.first->second.RecordAdditionalInfo(kSuggestMetadataKey, metadata); |
| } |
| } |
| + // Copy over answer data from lower-ranking item, if necessary. |
| + const AutocompleteMatch& less_relevant_match = |
| + i.first->second.duplicate_matches.back(); |
|
Mark P
2014/09/19 18:56:38
This makes me a little nervous because you're depe
groby-ooo-7-16
2014/09/22 05:49:25
Comment added. I think it's fairly clear, but call
|
| + if (!less_relevant_match.answer_type.empty()) { |
| + DCHECK(i.first->second.answer_type.empty()); |
|
Mark P
2014/09/19 18:56:38
Why is this true? Why can't multiple equivalent s
groby-ooo-7-16
2014/09/22 05:49:25
Because suggestions are only provided by the searc
|
| + i.first->second.answer_type = less_relevant_match.answer_type; |
| + i.first->second.answer_contents = less_relevant_match.answer_contents; |
| + } |
| } |
| } |