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

Unified Diff: components/omnibox/search_suggestion_parser.cc

Issue 1220653002: Fix some case-insensitive cases for StartsWith (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grt's review comments, Mac fix Created 5 years, 6 months 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 | « components/omnibox/base_search_provider.cc ('k') | components/omnibox/suggestion_answer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/search_suggestion_parser.cc
diff --git a/components/omnibox/search_suggestion_parser.cc b/components/omnibox/search_suggestion_parser.cc
index 32e6f04befa2d6a3593879bc737b825a4199261d..1e04d5fda21488563a67b9b8e6eb2040e9d6b3cb 100644
--- a/components/omnibox/search_suggestion_parser.cc
+++ b/components/omnibox/search_suggestion_parser.cc
@@ -148,7 +148,8 @@ void SearchSuggestionParser::SuggestResult::ClassifyMatchContents(
suggestion_.length() - match_contents_.length();
// Ensure the query starts with the input text, and ends with the match
// contents, and the input text has an overlap with contents.
- if (base::StartsWith(suggestion_, input_text, true) &&
+ if (base::StartsWith(suggestion_, input_text,
+ base::CompareCase::SENSITIVE) &&
base::EndsWith(suggestion_, match_contents_, true) &&
(input_text.length() > contents_index)) {
lookup_text = input_text.substr(contents_index);
« no previous file with comments | « components/omnibox/base_search_provider.cc ('k') | components/omnibox/suggestion_answer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698