[Autofill] Do not ignore form cache hits.
AutofillHandler::OnFormsSeen() ignores cache hits unless the found form is a credit card form. As a consequence, the newly seen form overrides existing cache entry. In particular, the newly seen form's values are stored in the cache. This violates the invariant that cached forms' values are the initial field values. In particular, it means that user-filled values may be considered initial values, in which case they are ignored at submission time. This CL makes OnFormsSeen() treat credit-card and address forms equally (i.e., not ignore cache hits), provided that kAutofillKeepInitialFormValuesInCache is enabled, except that in these cases where cache hits were formerly ignored. As a temporary solution to avoid breaking the captured-site tests, one difference between credit-card and address forms remains: in those cases where the pre-experiment code ignores cache hits, the experimental code ignores the cached signature, i.e., updates the form's signature to the newly seen one's. Bug: 1091401, 1096990 Change-Id: I76aa6d2374a33a11433628adb7560af8cad9c557 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2273068 Commit-Queue: Christoph Schwering <schwering@google.com> Reviewed-by:Dominic Battré <battre@chromium.org> Reviewed-by:
Matthias Körber <koerber@google.com> Cr-Commit-Position: refs/heads/master@{#784852}
Showing
Please register or sign in to comment