[Autofill] Adds profiles as a private data member in LabelFormatter.
Currently, profiles are passed once to Create() and once to GetLabels(). This is problematic because certain formatters, e.g. AddressContactFormLabelFormatters, are created specifically for the profiles passed to Create(), and the profiles could potentially change between the calls to Create() and GetLabels(). Now, LabelFormatters store a constant reference to a collection of profiles to ensure that the LabelFormatter and the labels it creates are guaranteed to be made for the same profiles. Bug: 958333 Change-Id: I242e3a24483afa614ea8256182d57b376abcdec9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1598492 Commit-Queue: Caitlin Fischer <caitlinfischer@google.com> Reviewed-by:Tommy Martino <tmartino@chromium.org> Reviewed-by:
Fabio Tirelo <ftirelo@chromium.org> Cr-Commit-Position: refs/heads/master@{#659226}
Showing
Please register or sign in to comment