Commit 2c7d54b4 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Check safe browsing reputation with EnablePasswordsAccountStorage

Before this CL: With the feature EnablePasswordsAccountStorage enabled,
calls to PasswordAutofillAgent::MaybeCheckSafeBrowsingReputation were
always bypassed (as an unintended side effect of showing the autofill
dropdown even if there are no password suggestions). This caused the
following two tests to fail with the feature enabled:
PasswordAutofillAgentTest.CheckSafeBrowsingReputationWhenUserStartsFillingUsernamePassword
NavigationMetricsRecorderBrowserTest.PasswordEntry_EngagementLevel

This CL rearranges the logic so that MaybeCheckSafeBrowsingReputation
gets called again when appropriate.

Bug: 1095984, 1093310
Change-Id: If51032f09463ec25bb239ffa410af822d13b4678
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247795Reviewed-by: default avatarFriedrich [CET] <fhorschig@chromium.org>
Reviewed-by: default avatarMaxim Kolosovskiy <kolos@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779716}
parent b550067b
......@@ -873,9 +873,10 @@ bool PasswordAutofillAgent::ShowSuggestions(
FindPasswordInfoForElement(element, UseFallbackData(true), &username_element,
&password_element, &password_info);
if (!password_info && !ShowPopupWithoutPasswords(password_element)) {
if (!password_info) {
MaybeCheckSafeBrowsingReputation(element);
return false;
if (!ShowPopupWithoutPasswords(password_element))
return false;
}
// Check that all fillable elements are editable.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment