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

Unified Diff: chrome/browser/autocomplete/shortcuts_backend.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger 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 | « chrome/browser/autocomplete/builtin_provider.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/shortcuts_backend.cc
diff --git a/chrome/browser/autocomplete/shortcuts_backend.cc b/chrome/browser/autocomplete/shortcuts_backend.cc
index 003be7055b202d7f3f00ae55f62010fb16cee093..4768209cd99603a654f1cd5fef45b4753860bbcf 100644
--- a/chrome/browser/autocomplete/shortcuts_backend.cc
+++ b/chrome/browser/autocomplete/shortcuts_backend.cc
@@ -131,9 +131,10 @@ void ShortcutsBackend::AddOrUpdateShortcut(const base::string16& text,
const base::string16 text_lowercase(base::i18n::ToLower(text));
const base::Time now(base::Time::Now());
for (ShortcutMap::const_iterator it(
- shortcuts_map_.lower_bound(text_lowercase));
+ shortcuts_map_.lower_bound(text_lowercase));
it != shortcuts_map_.end() &&
- StartsWith(it->first, text_lowercase, true); ++it) {
+ base::StartsWith(it->first, text_lowercase, true);
+ ++it) {
if (match.destination_url == it->second.match_core.destination_url) {
UpdateShortcut(ShortcutsDatabase::Shortcut(
it->second.id, text, MatchToMatchCore(match, profile_), now,
@@ -315,10 +316,10 @@ bool ShortcutsBackend::DeleteShortcutsWithURL(const GURL& url,
const std::string& url_spec = url.spec();
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) :
- StartsWithASCII(it->second->second.match_core.destination_url.spec(),
- url_spec, true)) {
+ if (exact_match ? (it->second->second.match_core.destination_url == url)
+ : base::StartsWithASCII(
+ it->second->second.match_core.destination_url.spec(),
+ url_spec, true)) {
shortcut_ids.push_back(it->first);
shortcuts_map_.erase(it->second);
guid_map_.erase(it++);
« no previous file with comments | « chrome/browser/autocomplete/builtin_provider.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698