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..d614232f8b907b63a97415b17cc6f3326f5a50a1 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; foo.bar, |
Mike Mammarella
2013/06/20 20:20:23
These examples are a little unclear because the re
nyquist
2013/06/21 21:01:27
Uses example.com now.
|
+ // m.foo.bar, baz.login.foo.bar and www.foo.bar would all resolve to foo.bar |
+ // if .bar 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.foo.bar |
+ // (where .bar is the public suffix) and the observed form is |
+ // http://m.foo.bar, |original_signon_realm| must be set to |
+ // http://www.foo.bar. |
+ 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(); |
}; |