Chromium Code Reviews| Index: components/omnibox/autocomplete_result.cc |
| diff --git a/components/omnibox/autocomplete_result.cc b/components/omnibox/autocomplete_result.cc |
| index 5d7c42c3a3ce1f0a84c7555e08d2b2ffd6febe13..1a9dadc634201d33ce04e276701519ca3dc9db82 100644 |
| --- a/components/omnibox/autocomplete_result.cc |
| +++ b/components/omnibox/autocomplete_result.cc |
| @@ -8,6 +8,7 @@ |
| #include <iterator> |
| #include "base/logging.h" |
| +#include "base/strings/string_split.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "components/metrics/proto/omnibox_event.pb.h" |
| #include "components/metrics/proto/omnibox_input_type.pb.h" |
| @@ -177,8 +178,11 @@ void AutocompleteResult::AppendMatches(const ACMatches& matches) { |
| void AutocompleteResult::SortAndCull( |
| const AutocompleteInput& input, |
| TemplateURLService* template_url_service) { |
| - for (ACMatches::iterator i(matches_.begin()); i != matches_.end(); ++i) |
| - i->ComputeStrippedDestinationURL(template_url_service); |
| + std::vector<base::string16> words; |
| + base::SplitString(input.text(), ' ', &words); |
| + for (ACMatches::iterator i(matches_.begin()); i != matches_.end(); ++i) { |
|
Peter Kasting
2015/06/01 21:04:08
Nit: No {}
Mark P
2015/06/04 23:31:31
Done.
|
| + i->ComputeStrippedDestinationURL(words, template_url_service); |
| + } |
| DedupMatchesByDestination(input.current_page_classification(), true, |
| &matches_); |