| Index: components/autofill/content/renderer/password_autofill_agent.h
|
| diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h
|
| index 12b7d03c639ea26bf5a605469ef298e507a68a04..20f9c6aad5668f48aefca4c2ac702d5bf45f2ea7 100644
|
| --- a/components/autofill/content/renderer/password_autofill_agent.h
|
| +++ b/components/autofill/content/renderer/password_autofill_agent.h
|
| @@ -14,6 +14,7 @@
|
| #include "components/autofill/content/common/autofill_driver.mojom.h"
|
| #include "components/autofill/content/renderer/autofill_agent.h"
|
| #include "components/autofill/content/renderer/password_form_conversion_utils.h"
|
| +#include "components/autofill/content/renderer/provisionally_saved_password_form.h"
|
| #include "components/autofill/core/common/form_data_predictions.h"
|
| #include "components/autofill/core/common/password_form.h"
|
| #include "components/autofill/core/common/password_form_field_prediction_map.h"
|
| @@ -239,15 +240,17 @@ class PasswordAutofillAgent : public content::RenderFrameObserver,
|
| void ClearPreview(blink::WebInputElement* username,
|
| blink::WebInputElement* password);
|
|
|
| - // Saves |password_form| in |provisionally_saved_form_|, as long as it
|
| - // satisfies |restriction|.
|
| + // Saves |password_form|, |form| and |input| in |provisionally_saved_form_|,
|
| + // as long as it satisfies |restriction|. |form| and |input| are the elements
|
| + // user has just been interacting with before the form save. |form| or |input|
|
| + // can be null but not both at the same time. For example: if the form is
|
| + // unowned, |form| will be null; if the user has submitted the form, |input|
|
| + // will be null.
|
| void ProvisionallySavePassword(std::unique_ptr<PasswordForm> password_form,
|
| + const blink::WebFormElement& form,
|
| + const blink::WebInputElement& input,
|
| ProvisionallySaveRestriction restriction);
|
|
|
| - // Returns true if |provisionally_saved_form_| has enough information that
|
| - // it is likely filled out.
|
| - bool ProvisionallySavedPasswordIsValid();
|
| -
|
| // Helper function called when in-page navigation completed
|
| void OnSamePageNavigationCompleted();
|
|
|
| @@ -260,7 +263,7 @@ class PasswordAutofillAgent : public content::RenderFrameObserver,
|
|
|
| // Set if the user might be submitting a password form on the current page,
|
| // but the submit may still fail (i.e. doesn't pass JavaScript validation).
|
| - std::unique_ptr<PasswordForm> provisionally_saved_form_;
|
| + ProvisionallySavedPasswordForm provisionally_saved_form_;
|
|
|
| // Map WebFormControlElement to the pair of:
|
| // 1) The most recent text that user typed or PasswordManager autofilled in
|
|
|