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

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

Issue 2708923006: [Password Manager] New criteria for submission detection. (Closed)
Patch Set: Removed debugging logging Created 3 years, 10 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_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_manager.cc
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index acb0e8dc32891c9ab2dd005a59e5d25383c83e76..59e693f5d8fd875381d031b36739ecaf22cb5670 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -131,6 +131,11 @@ bool ContainsAndroidCredentials(
return PreferredRealmIsFromAndroid(fill_data);
}
+bool AreAllFieldsEmpty(const PasswordForm& form) {
+ return form.username_value.empty() && form.password_value.empty() &&
+ form.new_password_value.empty();
+}
+
} // namespace
// static
@@ -644,6 +649,10 @@ void PasswordManager::OnPasswordFormsRendered(
URLsEqualUpToHttpHttpsSubstitution(
provisional_save_manager_->pending_credentials().action,
all_visible_forms_[i].action)) {
+ if (provisional_save_manager_
+ ->is_possible_change_password_form_without_username() &&
+ AreAllFieldsEmpty(all_visible_forms_[i]))
+ continue;
provisional_save_manager_->LogSubmitFailed();
if (logger) {
logger->LogPasswordForm(Logger::STRING_PASSWORD_FORM_REAPPEARED,
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698