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

Unified Diff: components/omnibox/shortcuts_backend.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: 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
Index: components/omnibox/shortcuts_backend.cc
diff --git a/components/omnibox/shortcuts_backend.cc b/components/omnibox/shortcuts_backend.cc
index 945639bf06155567d96838a0e7aca17701f16520..a28b0cb4b7ccece57c5227c5b9ea3350bbca820e 100644
--- a/components/omnibox/shortcuts_backend.cc
+++ b/components/omnibox/shortcuts_backend.cc
@@ -119,7 +119,8 @@ void ShortcutsBackend::AddOrUpdateShortcut(const base::string16& text,
for (ShortcutMap::const_iterator it(
shortcuts_map_.lower_bound(text_lowercase));
it != shortcuts_map_.end() &&
- base::StartsWith(it->first, text_lowercase, true);
+ base::StartsWith(it->first, text_lowercase,
+ base::CompareCase::SENSITIVE);
++it) {
if (match.destination_url == it->second.match_core.destination_url) {
UpdateShortcut(ShortcutsDatabase::Shortcut(
@@ -286,9 +287,9 @@ bool ShortcutsBackend::DeleteShortcutsWithURL(const GURL& url,
ShortcutsDatabase::ShortcutIDs shortcut_ids;
for (GuidMap::iterator it(guid_map_.begin()); it != guid_map_.end(); ) {
if (exact_match ? (it->second->second.match_core.destination_url == url)
- : base::StartsWithASCII(
+ : base::StartsWith(
it->second->second.match_core.destination_url.spec(),
- url_spec, true)) {
+ url_spec, base::CompareCase::SENSITIVE)) {
shortcut_ids.push_back(it->first);
shortcuts_map_.erase(it->second);
guid_map_.erase(it++);

Powered by Google App Engine
This is Rietveld 408576698