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

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

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
Index: components/omnibox/browser/keyword_provider.cc
diff --git a/components/omnibox/browser/keyword_provider.cc b/components/omnibox/browser/keyword_provider.cc
index b6f7877b3e30c00752b82e7d30b25e556b0ed3e5..8992f02f8717f4d795f9b93b76d03ee8866442e9 100644
--- a/components/omnibox/browser/keyword_provider.cc
+++ b/components/omnibox/browser/keyword_provider.cc
@@ -139,7 +139,8 @@ const TemplateURL* KeywordProvider::GetSubstitutingTemplateURLForInput(
// of the original input.
if (input->cursor_position() != base::string16::npos &&
!remaining_input.empty() &&
- base::EndsWith(input->text(), remaining_input, true)) {
+ base::EndsWith(input->text(), remaining_input,
+ base::CompareCase::SENSITIVE)) {
int offset = input->text().length() - input->cursor_position();
// The cursor should never be past the last character or before the
// first character.
« no previous file with comments | « components/google/core/browser/google_util.cc ('k') | components/omnibox/browser/search_suggestion_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698