| Index: components/autofill/core/common/autofill_util.cc
|
| diff --git a/components/autofill/core/common/autofill_util.cc b/components/autofill/core/common/autofill_util.cc
|
| index 28fc6c5e37cdfcf9ae714cffa0948f8b985f659f..faf019e8cdbecb36a56069c90ca5113bf30f1746 100644
|
| --- a/components/autofill/core/common/autofill_util.cc
|
| +++ b/components/autofill/core/common/autofill_util.cc
|
| @@ -105,4 +105,31 @@ bool IsDesktopPlatform() {
|
| #endif
|
| }
|
|
|
| +bool ShouldSkipField(const FormFieldData& field) {
|
| + return IsCheckable(field.check_status);
|
| +}
|
| +
|
| +bool IsCheckable(const FormFieldData::CheckStatus& check_status) {
|
| + return check_status != FormFieldData::CheckStatus::NOT_CHECKABLE;
|
| +}
|
| +
|
| +bool IsChecked(const FormFieldData::CheckStatus& check_status) {
|
| + return check_status == FormFieldData::CheckStatus::CHECKED;
|
| +}
|
| +
|
| +void SetCheckStatus(FormFieldData* form_field_data,
|
| + bool isCheckable,
|
| + bool isChecked) {
|
| + if (isChecked) {
|
| + form_field_data->check_status = FormFieldData::CheckStatus::CHECKED;
|
| + } else {
|
| + if (isCheckable) {
|
| + form_field_data->check_status =
|
| + FormFieldData::CheckStatus::CHECKABLE_BUT_UNCHECKED;
|
| + } else {
|
| + form_field_data->check_status = FormFieldData::CheckStatus::NOT_CHECKABLE;
|
| + }
|
| + }
|
| +}
|
| +
|
| } // namespace autofill
|
|
|