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:

committed by
Chromium LUCI CQ

parent
63ba7eaa0d
commit
13848189ed
components/autofill/core/browser
@@ -250,14 +250,16 @@ AutofillField::AutofillField(FieldSignature field_signature) : AutofillField() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AutofillField::AutofillField(const FormFieldData& field)
|
AutofillField::AutofillField(const FormFieldData& field)
|
||||||
: FormFieldData(field),
|
: FormFieldData(field), parseable_name_(name), parseable_label_(label) {
|
||||||
parseable_name_(field.name),
|
|
||||||
parseable_label_(field.label) {
|
|
||||||
field_signature_ =
|
field_signature_ =
|
||||||
CalculateFieldSignatureByNameAndType(name, form_control_type);
|
CalculateFieldSignatureByNameAndType(name, form_control_type);
|
||||||
local_type_predictions_.fill(NO_SERVER_DATA);
|
local_type_predictions_.fill(NO_SERVER_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AutofillField::AutofillField(AutofillField&&) = default;
|
||||||
|
|
||||||
|
AutofillField& AutofillField::operator=(AutofillField&&) = default;
|
||||||
|
|
||||||
AutofillField::~AutofillField() = default;
|
AutofillField::~AutofillField() = default;
|
||||||
|
|
||||||
std::unique_ptr<AutofillField> AutofillField::CreateForPasswordManagerUpload(
|
std::unique_ptr<AutofillField> AutofillField::CreateForPasswordManagerUpload(
|
||||||
|
@@ -59,6 +59,8 @@ class AutofillField : public FormFieldData {
|
|||||||
|
|
||||||
AutofillField(const AutofillField&) = delete;
|
AutofillField(const AutofillField&) = delete;
|
||||||
AutofillField& operator=(const AutofillField&) = delete;
|
AutofillField& operator=(const AutofillField&) = delete;
|
||||||
|
AutofillField(AutofillField&&);
|
||||||
|
AutofillField& operator=(AutofillField&&);
|
||||||
|
|
||||||
virtual ~AutofillField();
|
virtual ~AutofillField();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user