Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1547)

Unified Diff: content/public/common/password_form.h

Issue 15660018: [autofill] Add support for PSL domain matching for password autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed test expectation to match intention and comment Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
};
« no previous file with comments | « components/autofill/core/common/password_form_fill_data_unittest.cc ('k') | content/public/common/password_form.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698