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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm

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: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
index 840de4691a5448a42c11920eca203af5776de4a5..0fa91ec3e4fef6577e4c4391d7b71c22d55b2c15 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
@@ -563,8 +563,10 @@ NSAttributedString* CreateClassifiedAttributedString(
match.GetAdditionalInfo(kACMatchPropertyContentsStartIndex),
&contentsStartIndex);
// Ignore invalid state.
- if (!base::StartsWith(match.fill_into_edit, inputText, true) ||
- !base::EndsWith(match.fill_into_edit, match.contents, true) ||
+ if (!base::StartsWith(match.fill_into_edit, inputText,
+ base::CompareCase::SENSITIVE) ||
+ !base::EndsWith(match.fill_into_edit, match.contents,
+ base::CompareCase::SENSITIVE) ||
((size_t)contentsStartIndex >= inputText.length())) {
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698