0

Introduce move operators for AutofillField.

AutofillField inherits from a copyable and moveable type, FormData and
all of its members are (copyable and) moveable as well.

Bug: 1466062
Change-Id: I02acc7dfb7f8957de2acedb88729e47784665cbe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4700303
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Christoph Schwering <schwering@google.com>
Commit-Queue: Jan Keitel <jkeitel@google.com>
Cr-Commit-Position: refs/heads/main@{#1172970}
This commit is contained in:
Jan Keitel
2023-07-20 15:13:06 +00:00
committed by Chromium LUCI CQ
parent 63ba7eaa0d
commit 13848189ed
2 changed files with 7 additions and 3 deletions
components/autofill/core/browser

@ -250,14 +250,16 @@ AutofillField::AutofillField(FieldSignature field_signature) : AutofillField() {
}
AutofillField::AutofillField(const FormFieldData& field)
: FormFieldData(field),
parseable_name_(field.name),
parseable_label_(field.label) {
: FormFieldData(field), parseable_name_(name), parseable_label_(label) {
field_signature_ =
CalculateFieldSignatureByNameAndType(name, form_control_type);
local_type_predictions_.fill(NO_SERVER_DATA);
}
AutofillField::AutofillField(AutofillField&&) = default;
AutofillField& AutofillField::operator=(AutofillField&&) = default;
AutofillField::~AutofillField() = default;
std::unique_ptr<AutofillField> AutofillField::CreateForPasswordManagerUpload(

@ -59,6 +59,8 @@ class AutofillField : public FormFieldData {
AutofillField(const AutofillField&) = delete;
AutofillField& operator=(const AutofillField&) = delete;
AutofillField(AutofillField&&);
AutofillField& operator=(AutofillField&&);
virtual ~AutofillField();