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

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

Issue 508143002: Remove Finch kill switch for PSL matching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 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.

Powered by Google App Engine
This is Rietveld 408576698