Index: components/autofill/core/common/password_form.h |
diff --git a/components/autofill/core/common/password_form.h b/components/autofill/core/common/password_form.h |
index 8bcf44850a8d6f537694bcedfcddb219b24931a7..e3cbe6b03fd3e5941bae51c6a8d3e13806333f74 100644 |
--- a/components/autofill/core/common/password_form.h |
+++ b/components/autofill/core/common/password_form.h |
@@ -84,6 +84,18 @@ struct PasswordForm { |
LAYOUT_LAST = LAYOUT_LOGIN_AND_SIGNUP |
}; |
+ // Events that Password Manager uses as triggers for checking a success of a |
+ // password form submission. |
+ enum class SubmissionEvent { |
engedy
2017/05/09 22:02:59
nit: To avoid using overloaded words in this conte
dvadym
2017/05/10 12:10:12
Thanks, it makes sense. Renamed to SubmissionIndic
engedy
2017/05/10 13:07:42
Acknowledged.
|
+ NONE, |
+ HTML_FORM_SUBMISSION, |
+ INPAGE_NAVIGATION, |
+ XHR_SUCCEEDED, |
+ FRAME_DETACHED, |
+ BY_CONTEXT_MENU_CLICK, |
+ SUBMISSION_EVENT_COUNT |
+ }; |
+ |
// The "Realm" for the sign-on. This is scheme, host, port for SCHEME_HTML. |
// Dialog based forms also contain the HTTP realm. Android based forms will |
// contain a string of the form "android://<hash of cert>@<package name>" |
@@ -278,6 +290,9 @@ struct PasswordForm { |
// If true, this form looks like SignUp form according to local heuristics. |
bool does_look_like_signup_form; |
+ // Type of event which was used for this form submission. |
+ SubmissionEvent submission_event; |
engedy
2017/05/09 22:02:59
I wonder if Vasilii and Vaclav are going to be rea
dvadym
2017/05/10 12:10:12
Don't worry, with the refactoring PasswordForm wil
engedy
2017/05/10 13:07:42
Fair enough, and glad to hear that this abominatio
dvadym
2017/05/10 14:09:25
Here many fields in PasswordForm is the smallest p
|
+ |
// Return true if we consider this form to be a change password form. |
// We use only client heuristics, so it could include signup forms. |
bool IsPossibleChangePasswordForm() const; |
@@ -315,6 +330,8 @@ base::string16 OtherPossibleUsernamesToString( |
std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); |
std::ostream& operator<<(std::ostream& os, const PasswordForm& form); |
std::ostream& operator<<(std::ostream& os, PasswordForm* form); |
+std::ostream& operator<<(std::ostream& os, |
+ PasswordForm::SubmissionEvent submission_event); |
} // namespace autofill |