Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: components/omnibox/browser/search_provider.cc

Issue 1543803004: Compare case insensitively when copying answers into verbatim matches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introduce trimmed_verbatim_lower variable Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/search_provider.cc
diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc
index b26910c402d44f768d003376794b125ea66adc2e..a6be87ee6d2bfe860a9e91356ba2071b3fd5a903 100644
--- a/components/omnibox/browser/search_provider.cc
+++ b/components/omnibox/browser/search_provider.cc
@@ -926,9 +926,12 @@ void SearchProvider::ConvertResultsToAutocompleteMatches() {
base::string16 answer_contents;
base::string16 answer_type;
scoped_ptr<SuggestionAnswer> answer;
+ base::string16 trimmed_verbatim_lower =
+ base::i18n::ToLower(trimmed_verbatim);
for (ACMatches::iterator it = matches_.begin(); it != matches_.end();
++it) {
- if (it->answer && it->fill_into_edit == trimmed_verbatim) {
+ if (it->answer &&
+ base::i18n::ToLower(it->fill_into_edit) == trimmed_verbatim_lower) {
answer_contents = it->answer_contents;
answer_type = it->answer_type;
answer = SuggestionAnswer::copy(it->answer.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698