Hi Chris,
Could you please take a look?
Thank you,
Mohamed
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// email verification values per field, preventing IPC spam on alternating
// focus.We do that anyway with `FocusOn[Non]FormField()` already, don't we?
autofill_driver->StartEmailVerification(form, field_id, value);Can we instead
?
That'd avoid a specialized event and makes an existing event more useful and keep EVP-specific logic out of the renderer and out of `AutofillAgent` in particular (if it has to live in the renderer, it should probably go in the helper class).
const FormData& form,The form should likely be parsed. (Mostly note to self.)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks a lot Chris!
Could you please take another look?
// Flush the message loop to ensure nothing was posted.
base::RunLoop run_loop;
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
FROM_HERE, run_loop.QuitClosure());
run_loop.Run(); // email verification values per field, preventing IPC spam on alternating
// focus.We do that anyway with `FocusOn[Non]FormField()` already, don't we?
Acknowledged
autofill_driver->StartEmailVerification(form, field_id, value);Can we instead
- retrofit DidEndTextFieldEditing() with a `FormData` + `FieldGlobalId`
- parse the form
- retrieve the `AutofillField` for that `FieldGlobalId`
- look at the `AutofillField::value()` and `AutofillField::last_modifier()`
?
That'd avoid a specialized event and makes an existing event more useful and keep EVP-specific logic out of the renderer and out of `AutofillAgent` in particular (if it has to live in the renderer, it should probably go in the helper class).
Tried a slightly different approach that was discussed over chat!
The form should likely be parsed. (Mostly note to self.)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
void EmailVerifierDelegate::OnFieldLostFocus(AutofillManager& manager,Is this better than using something based on AutofillManager::OnDidEndTextFieldEditing?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
void OnFieldLostFocus(AutofillManager& manager,
const FieldGlobalId& field_id);
Member functions go above member variables 😜
if (value.empty() || value.length() > 256 ||Can a reasonable email address be shorter than `x@y.z` or at least `x@y`? I.e., check `value.size() <= 3` or `value.size() <= 5`?
value.find(u'@') == std::u16string::npos) {Should this also require a domain (i.e., a `u'.'` after the `u'@'`)?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |