Commit 4bac4f1c authored by Maria Kazinova's avatar Maria Kazinova Committed by Commit Bot

Stopped SavePasswordInfoBar from expiring on form submission.

On some websites multiple redirects occur straight after login
but on iOS they are not treated as redirects, but rather as form
submissions, so the infobar should not expire not only on redirects,
but on form submission navigation as well.

Bug: 720090, 720154
Change-Id: I766ee66749d0f4942206cc44a6d5d1e50a2a672b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2066617Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Maria Kazinova <kazinova@google.com>
Cr-Commit-Position: refs/heads/master@{#743115}
parent fb15536a
......@@ -223,7 +223,8 @@ void IOSChromeSavePasswordInfoBarDelegate::InfoBarDismissed() {
bool IOSChromeSavePasswordInfoBarDelegate::ShouldExpire(
const NavigationDetails& details) const {
return !details.is_redirect && ConfirmInfoBarDelegate::ShouldExpire(details);
return !details.is_form_submission && !details.is_redirect &&
ConfirmInfoBarDelegate::ShouldExpire(details);
}
void IOSChromeSavePasswordInfoBarDelegate::UpdateCredentials(
......
......@@ -38,6 +38,8 @@ class IOSChromeUpdatePasswordInfoBarDelegate
~IOSChromeUpdatePasswordInfoBarDelegate() override;
bool ShouldExpire(const NavigationDetails& details) const override;
// Returns whether the user has multiple saved credentials, of which the
// infobar affects just one. If so, the infobar should clarify which
// credential is being affected.
......
......@@ -56,6 +56,12 @@ IOSChromeUpdatePasswordInfoBarDelegate::
infobar_response());
}
bool IOSChromeUpdatePasswordInfoBarDelegate::ShouldExpire(
const NavigationDetails& details) const {
return !details.is_form_submission && !details.is_redirect &&
ConfirmInfoBarDelegate::ShouldExpire(details);
}
IOSChromeUpdatePasswordInfoBarDelegate::IOSChromeUpdatePasswordInfoBarDelegate(
bool is_sync_user,
std::unique_ptr<PasswordFormManagerForUI> form_manager)
......
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