[Password Manager] Fix incorrect saving when autofill and generation both trigger
If the password manager fills a field and generation triggers for the same field,
currently we will not correctly update the password that is entered in the field.
This means that if the user enters a different password than was autofilled, the
new saved password will be incorrect.
There are two specific changes here:
- Update PasswordAutofillAgent's state when text changes regardless of if it is
allowed to show a popup.
- Specifically inform PasswordAutofillAgent when a generated password is accepted
as this text change is dropped as it looks like script updating the page.
Eventually we should not autofill into fields that generation triggers on, since
we don't want to fill old data into a signup form. That change is more involved
thought.
TBR=sky@chromium.org
BUG=493455
Review URL: https://codereview.chromium.org/
1154153004
Cr-Commit-Position: refs/heads/master@{#332733}