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

Unified Diff: components/password_manager/core/browser/password_form_manager.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y 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/password_manager/core/browser/password_form_manager.cc
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index 7815782266219179c740fe28505188a680fb7a37..f6738f8c8622ff88b0c6dfbfbbbc60c8a71cf752 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -170,7 +170,7 @@ PasswordFormManager::MatchResultMask PasswordFormManager::DoesManage(
origins_match =
observed_form_.origin.host() == form.origin.host() &&
observed_form_.origin.port() == form.origin.port() &&
- base::StartsWithASCII(new_path, old_path, /*case_sensitive=*/true);
+ base::StartsWith(new_path, old_path, base::CompareCase::SENSITIVE);
}
if (!origins_match)
@@ -400,7 +400,8 @@ void PasswordFormManager::OnRequestDone(
// instead of explicitly handling empty path matches.
bool is_credential_protected =
observed_form_.scheme == PasswordForm::SCHEME_HTML &&
- base::StartsWithASCII("/", login->origin.path(), true) &&
+ base::StartsWith("/", login->origin.path(),
+ base::CompareCase::SENSITIVE) &&
credential_scores[i] > 0 && !login->blacklisted_by_user;
// Passwords generated on a signup form must show on a login form even if
// there are better-matching saved credentials. TODO(gcasto): We don't

Powered by Google App Engine
This is Rietveld 408576698