Create missing NewPasswordFormManager during provisionally saving.

The normal flow:
1.A form is loaded on a page, NewPasswordFormManager is created.
2.The form is submitted (by the user or by JavaScript)
3.The submitted data are saved provisionally in the corresponding
4.The form is disappeared from the page (that's considered as submission
success criteria), the proviosionally saved data are used for offering

But in principle, step 1 might be missing, for example when JavaScript
creates a dummy form, copies user typed credentials to the form and
submits the form.

This CL ensures, that we will save even in that case, by creating
NewPasswordFormManager in step 2, if it is not created yet.

Bug: 831123
Change-Id: I17b9d42d6ed4bb2daf2f052e84b376490f556bc8
Commit-Queue: Vadym Doroshenko <>
Reviewed-by: Maxim Kolosovskiy <>
Cr-Commit-Position: refs/heads/master@{#625244}
3 files changed