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

Unified Diff: components/autofill/content/renderer/password_autofill_agent.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
Index: components/autofill/content/renderer/password_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index ea8944a26a098cfda0842c0c72e8096fd047d984..fd9ac7f7b1343a90d80f5ba76cca4b5bb8c4bdf6 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -225,7 +225,7 @@ bool DoUsernamesMatch(const base::string16& username1,
bool exact_match) {
if (exact_match)
return username1 == username2;
- return StartsWith(username1, username2, true);
+ return base::StartsWith(username1, username2, true);
}
// Returns |true| if the given element is editable. Otherwise, returns |false|.
@@ -288,21 +288,21 @@ bool GetSuggestionsStats(const PasswordFormFillData& fill_data,
for (const auto& usernames : fill_data.other_possible_usernames) {
for (size_t i = 0; i < usernames.second.size(); ++i) {
if (show_all ||
- StartsWith(usernames.second[i], current_username, false)) {
+ base::StartsWith(usernames.second[i], current_username, false)) {
*suggestions_present = true;
return true;
}
}
}
- if (show_all ||
- StartsWith(fill_data.username_field.value, current_username, false)) {
+ if (show_all || base::StartsWith(fill_data.username_field.value,
+ current_username, false)) {
*suggestions_present = true;
return false;
}
for (const auto& login : fill_data.additional_logins) {
- if (show_all || StartsWith(login.first, current_username, false)) {
+ if (show_all || base::StartsWith(login.first, current_username, false)) {
*suggestions_present = true;
return false;
}

Powered by Google App Engine
This is Rietveld 408576698