Remove PasswordAutofillAgent::TextFieldDidEndEditing

PasswordAutofillAgent::TextFieldDidEndEditing provided special handling for
situations when automatic filling was blocked (Incognito, PSL-matched
credentials, etc.): in those cases, when the user filled the username to match
some of the fillable credentials, that credential was filled even though the
user did not select a fill suggestion.

It is no longer clear what was the motivation for this behaviour. The code has
been like this before it was ported from WebKit in 2010. It seems unnecessary,
a little unexpected, and leads to a bug when a page can trigger autofill of
credentials with empty usernames in cases where they should not be autofilled
(e.g., Incognito).

Therefore, this CL removes PasswordAutofillAgent::TextFieldDidEndEditing and
the associated functionality: credentials are now only filled when the user
selects a suggestion (or when the credentials are fit for automatic filling).

R=dvadym@chromium.org
BUG=636461

Review-Url: https://codereview.chromium.org/2236413002
Cr-Commit-Position: refs/heads/master@{#411335}
4 files changed