| Index: chrome/browser/autocomplete/autocomplete_result.cc
|
| diff --git a/chrome/browser/autocomplete/autocomplete_result.cc b/chrome/browser/autocomplete/autocomplete_result.cc
|
| index 675a96c7382afad2b89cb9076a5668ffb4121e4b..f502edd53b21f5abed35da5f176c2593feaf1bf9 100644
|
| --- a/chrome/browser/autocomplete/autocomplete_result.cc
|
| +++ b/chrome/browser/autocomplete/autocomplete_result.cc
|
| @@ -259,20 +259,15 @@ AutocompleteMatch* AutocompleteResult::match_at(size_t index) {
|
|
|
| bool AutocompleteResult::ShouldHideTopMatch() const {
|
| // Gate on our field trial flag.
|
| - if (!chrome::ShouldHideTopVerbatimMatch())
|
| - return false;
|
| + return chrome::ShouldHideTopVerbatimMatch() &&
|
| + TopMatchIsVerbatimAndHasNoConsecutiveVerbatimMatches();
|
| +}
|
|
|
| - // If we don't have a verbatim first match, show everything.
|
| +bool AutocompleteResult::TopMatchIsVerbatimAndHasNoConsecutiveVerbatimMatches()
|
| + const {
|
| if (empty() || !match_at(0).IsVerbatimType())
|
| return false;
|
| -
|
| - // If the verbatim first match is followed by another verbatim match, don't
|
| - // hide anything, lest we cause user confusion.
|
| - if ((size() > 1) && match_at(1).IsVerbatimType())
|
| - return false;
|
| -
|
| - // Otherwise, it's safe to hide the verbatim first match.
|
| - return true;
|
| + return !(size() > 1) || !match_at(1).IsVerbatimType();
|
| }
|
|
|
| void AutocompleteResult::Reset() {
|
|
|