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

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

Issue 269813012: [Password Manager] Remove PSL matching for non-HTML forms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/login_database.cc
diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc
index a65bf05509bd412527089d12fae5a7c73a0afd9f..fe6451f0d09146e2f2621cbf056fd3118098ed7b 100644
--- a/components/password_manager/core/browser/login_database.cc
+++ b/components/password_manager/core/browser/login_database.cc
@@ -436,7 +436,8 @@ bool LoginDatabase::GetLogins(const PasswordForm& form,
PSLMatchingHelper::GetRegistryControlledDomain(signon_realm);
PSLMatchingHelper::PSLDomainMatchMetric psl_domain_match_metric =
PSLMatchingHelper::PSL_DOMAIN_MATCH_NONE;
- if (psl_helper_.ShouldPSLDomainMatchingApply(registered_domain)) {
+ if (psl_helper_.ShouldPSLDomainMatchingApply(registered_domain) &&
+ form.scheme == PasswordForm::SCHEME_HTML) {
// We are extending the original SQL query with one that includes more
// possible matches based on public suffix domain matching. Using a regexp
// here is just an optimization to not have to parse all the stored entries
@@ -481,7 +482,8 @@ bool LoginDatabase::GetLogins(const PasswordForm& form,
DCHECK(result == ENCRYPTION_RESULT_SUCCESS);
if (psl_helper_.IsMatchingEnabled()) {
if (!PSLMatchingHelper::IsPublicSuffixDomainMatch(new_form->signon_realm,
- form.signon_realm)) {
+ form.signon_realm) ||
+ new_form->scheme != PasswordForm::SCHEME_HTML) {
vabr (Chromium) 2014/05/07 07:57:38 optional nit: Consider swapping the order of the t
Garrett Casto 2014/05/08 20:01:20 Done.
// The database returned results that should not match. Skipping result.
continue;
}

Powered by Google App Engine
This is Rietveld 408576698