Index: content/public/common/password_form.h |
diff --git a/content/public/common/password_form.h b/content/public/common/password_form.h |
index 1a70685305b274874b49720e53a4f68c73aa6b28..4fced39c219c25d839ad3262ac9b3d5d056a1c3c 100644 |
--- a/content/public/common/password_form.h |
+++ b/content/public/common/password_form.h |
@@ -54,6 +54,24 @@ struct CONTENT_EXPORT PasswordForm { |
// data from the database, so it must not be empty. |
std::string signon_realm; |
+ // The original "Realm" for the sign-on (scheme, host, port for SCHEME_HTML, |
+ // and contains the HTTP realm for dialog-based forms). This realm is only set |
+ // when two PasswordForms are matched when trying to find a login/pass pair |
+ // for a site. It is only set to a non-empty value during a match of the |
+ // original stored login/pass and the current observed form if all these |
+ // statements are true: |
+ // 1) The full signon_realm is not the same. |
+ // 2) The registry controlled domain is the same. For example; example.com, |
+ // m.example.com, foo.login.example.com and www.example.com would all resolve |
+ // to example.com since .com is the public suffix. |
+ // 3) The scheme is the same. |
+ // 4) The port is the same. |
+ // For example, if there exists a stored password for http://www.example.com |
+ // (where .com is the public suffix) and the observed form is |
+ // http://m.example.com, |original_signon_realm| must be set to |
+ // http://www.example.com. |
+ std::string original_signon_realm; |
+ |
// The URL (minus query parameters) containing the form. This is the primary |
// data used by the PasswordManager to decide (in longest matching prefix |
// fashion) whether or not a given PasswordForm result from the database is a |
@@ -163,6 +181,9 @@ struct CONTENT_EXPORT PasswordForm { |
// When parsing an HTML form, this is not used. |
int times_used; |
+ // Returns true if this match was found using public suffix matching. |
+ bool IsPublicSuffixMatch() const; |
+ |
PasswordForm(); |
~PasswordForm(); |
}; |