| 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 e4efba909aa5b7a014665200b3426513b1c158ca..fa36c229456961ec1d73dbc4f1c4370f13e41c16 100644
|
| --- a/components/password_manager/core/browser/login_database.cc
|
| +++ b/components/password_manager/core/browser/login_database.cc
|
| @@ -590,9 +590,10 @@ bool LoginDatabase::GetLogins(const PasswordForm& form,
|
| PSLMatchingHelper::GetRegistryControlledDomain(signon_realm);
|
| PSLMatchingHelper::PSLDomainMatchMetric psl_domain_match_metric =
|
| PSLMatchingHelper::PSL_DOMAIN_MATCH_NONE;
|
| + const bool should_PSL_matching_apply =
|
| + psl_helper_.ShouldPSLDomainMatchingApply(registered_domain);
|
| // PSL matching only applies to HTML forms.
|
| - if (form.scheme == PasswordForm::SCHEME_HTML &&
|
| - psl_helper_.ShouldPSLDomainMatchingApply(registered_domain)) {
|
| + if (form.scheme == PasswordForm::SCHEME_HTML && should_PSL_matching_apply) {
|
| // 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
|
| @@ -635,7 +636,7 @@ bool LoginDatabase::GetLogins(const PasswordForm& form,
|
| if (result == ENCRYPTION_RESULT_ITEM_FAILURE)
|
| continue;
|
| DCHECK(result == ENCRYPTION_RESULT_SUCCESS);
|
| - if (psl_helper_.IsMatchingEnabled()) {
|
| + if (should_PSL_matching_apply) {
|
| if (!PSLMatchingHelper::IsPublicSuffixDomainMatch(new_form->signon_realm,
|
| form.signon_realm)) {
|
| // The database returned results that should not match. Skipping result.
|
|
|