[Autofill] Added utils for creating LabelFormatters.
Making a new branch and CL to resolve issues with git and try jobs. Original CL: https://chromium-review.googlesource.com/c/chromium/src/+/1498614 The utils for making various LabelFormatters sometimes favor std::set over std::vector so that poorly formed forms, e.g. forms with duplicate fields, do not interfere with processing later on. Sets allow us to safely assume that there is just one of a particular ServerFieldType or FieldTypeGroup. It is worth noting that ContactFormLabelFormatters store their FieldTypeGroups while AddressFormLabelFormatters do not. This is because address forms are guaranteed to have ADDRESS_HOME and NAME; however, contact forms could have NAME and PHONE_HOME, EMAIL, or both PHONE_HOME and EMAIL. It is useful for a ContactFormLabelFormatter to know which subset of FieldTypeGroups correspond to its fields. Change-Id: I6164081759848b263c3d9dd5cfcda190388a3d5a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506116 Commit-Queue: Caitlin Fischer <caitlinfischer@google.com> Reviewed-by:Tommy Martino <tmartino@chromium.org> Cr-Commit-Position: refs/heads/master@{#638682}
Showing
Please register or sign in to comment