| Index: chrome/browser/autocomplete/shortcuts_provider.cc
|
| diff --git a/chrome/browser/autocomplete/shortcuts_provider.cc b/chrome/browser/autocomplete/shortcuts_provider.cc
|
| index 5e320e7d26e4e6c87ffcb7a5b4340d9be49312a1..0b52176fe116a828ac2d250f7bca33236a0da282 100644
|
| --- a/chrome/browser/autocomplete/shortcuts_provider.cc
|
| +++ b/chrome/browser/autocomplete/shortcuts_provider.cc
|
| @@ -294,25 +294,7 @@ ACMatchClassifications ShortcutsProvider::ClassifyAllMatchesInString(
|
| last_position = std::max(last_position, next_character);
|
| }
|
|
|
| - // Merge match-marking data with original classifications.
|
| - if ((match_class.size() == 1) &&
|
| - (match_class.back().style == ACMatchClassification::NONE))
|
| - return original_class;
|
| - ACMatchClassifications output;
|
| - for (ACMatchClassifications::const_iterator i = original_class.begin(),
|
| - j = match_class.begin(); i != original_class.end();) {
|
| - AutocompleteMatch::AddLastClassificationIfNecessary(&output,
|
| - std::max(i->offset, j->offset), i->style | j->style);
|
| - const size_t next_i_offset = (i + 1) == original_class.end() ?
|
| - static_cast<size_t>(-1) : (i + 1)->offset;
|
| - const size_t next_j_offset = (j + 1) == match_class.end() ?
|
| - static_cast<size_t>(-1) : (j + 1)->offset;
|
| - if (next_i_offset >= next_j_offset)
|
| - ++j;
|
| - if (next_j_offset >= next_i_offset)
|
| - ++i;
|
| - }
|
| - return output;
|
| + return AutocompleteMatch::MergeClassifications(original_class, match_class);
|
| }
|
|
|
| history::ShortcutsBackend::ShortcutMap::const_iterator
|
|
|