Commit c5f0324b authored by Maria Kazinova's avatar Maria Kazinova Committed by Commit Bot

PasswordSaveManagerImpl: reset unique_renderer_id of an element when

needed.

When pending credentials for newly added credentials are created,
some elements of a parsed PasswordForm structure must be reset. And they
are reset, but the corresponding unique_renderer_id is not cleared,
making it hard to rely on unqiue_renderer_id in some logic.

Change-Id: I6881ed83410db9dc2ac6850e0c0317003a31647d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2308717Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Maria Kazinova <kazinova@google.com>
Cr-Commit-Position: refs/heads/master@{#790772}
parent e11f6212
......@@ -20,6 +20,7 @@
#include "components/password_manager/core/browser/votes_uploader.h"
#include "components/password_manager/core/common/password_manager_features.h"
using autofill::FieldRendererId;
using autofill::FormData;
using autofill::FormFieldData;
using autofill::FormStructure;
......@@ -56,6 +57,7 @@ PasswordForm PendingCredentialsForNewCredentials(
// The new password's value and element name should be empty.
pending_credentials.new_password_value.clear();
pending_credentials.new_password_element.clear();
pending_credentials.new_password_element_renderer_id = FieldRendererId();
return pending_credentials;
}
......
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