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

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

Issue 1886283002: Blacklisting applied to the form and the page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed obfuscating mix of return trues and falses Created 4 years, 8 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
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 52fe030768a0e7d5e212c1f687a0489c43c620d2..a702e61d74bf64ecae2f1cfd7b8fff95f54408ac 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -1251,15 +1251,13 @@ bool PasswordFormManager::IsBlacklistMatch(
if (blacklisted_form.origin.GetOrigin() != observed_form_.origin.GetOrigin())
return false;
if (observed_form_.scheme == PasswordForm::SCHEME_HTML) {
- if (!AreStringsEqualOrEmpty(blacklisted_form.submit_element,
- observed_form_.submit_element))
- return false;
- if (!AreStringsEqualOrEmpty(blacklisted_form.password_element,
- observed_form_.password_element))
- return false;
- if (!AreStringsEqualOrEmpty(blacklisted_form.username_element,
- observed_form_.username_element))
- return false;
+ return (blacklisted_form.origin.path() == observed_form_.origin.path()) ||
+ (AreStringsEqualOrEmpty(blacklisted_form.submit_element,
+ observed_form_.submit_element) &&
+ AreStringsEqualOrEmpty(blacklisted_form.password_element,
+ observed_form_.password_element) &&
+ AreStringsEqualOrEmpty(blacklisted_form.username_element,
+ observed_form_.username_element));
}
return true;
}
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698