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

Side by Side 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 android label with 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__ 5 #ifndef CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__
6 #define CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__ 6 #define CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 SCHEME_DIGEST, 47 SCHEME_DIGEST,
48 SCHEME_OTHER 48 SCHEME_OTHER
49 } scheme; 49 } scheme;
50 50
51 // The "Realm" for the sign-on (scheme, host, port for SCHEME_HTML, and 51 // The "Realm" for the sign-on (scheme, host, port for SCHEME_HTML, and
52 // contains the HTTP realm for dialog-based forms). 52 // contains the HTTP realm for dialog-based forms).
53 // The signon_realm is effectively the primary key used for retrieving 53 // The signon_realm is effectively the primary key used for retrieving
54 // data from the database, so it must not be empty. 54 // data from the database, so it must not be empty.
55 std::string signon_realm; 55 std::string signon_realm;
56 56
57 // The original "Realm" for the sign-on (scheme, host, port for SCHEME_HTML,
58 // and contains the HTTP realm for dialog-based forms). This realm is only set
59 // when two PasswordForms are matched when trying to find a login/pass pair
60 // for a site. It is only set to a non-empty value during a match of the
61 // original stored login/pass and the current observed form if all these
62 // statements are true:
63 // 1) The full signon_realm is not the same.
64 // 2) The registry controlled domain is the same. For example; foo.bar,
65 // m.foo.bar and www.foo.bar would all resolve to foo.bar if .bar is the
66 // public suffix.
67 // 3) The scheme is the same.
68 // 4) The port is the same.
69 // For example, if you have a password for http://www.foo.bar (where .bar is
70 // the public suffix) and the observed form is http://m.foo.bar,
71 // |original_signon_realm| must be set to http://www.foo.bar.
72 std::string original_signon_realm;
73
57 // The URL (minus query parameters) containing the form. This is the primary 74 // The URL (minus query parameters) containing the form. This is the primary
58 // data used by the PasswordManager to decide (in longest matching prefix 75 // data used by the PasswordManager to decide (in longest matching prefix
59 // fashion) whether or not a given PasswordForm result from the database is a 76 // fashion) whether or not a given PasswordForm result from the database is a
60 // good fit for a particular form on a page, so it must not be empty. 77 // good fit for a particular form on a page, so it must not be empty.
61 GURL origin; 78 GURL origin;
62 79
63 // The action target of the form. This is the primary data used by the 80 // The action target of the form. This is the primary data used by the
64 // PasswordManager for form autofill; that is, the action of the saved 81 // PasswordManager for form autofill; that is, the action of the saved
65 // credentials must match the action of the form on the page to be autofilled. 82 // credentials must match the action of the form on the page to be autofilled.
66 // If this is empty / not available, it will result in a "restricted" 83 // If this is empty / not available, it will result in a "restricted"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 PasswordForm(); 183 PasswordForm();
167 ~PasswordForm(); 184 ~PasswordForm();
168 }; 185 };
169 186
170 // Map username to PasswordForm* for convenience. See password_form_manager.h. 187 // Map username to PasswordForm* for convenience. See password_form_manager.h.
171 typedef std::map<string16, PasswordForm*> PasswordFormMap; 188 typedef std::map<string16, PasswordForm*> PasswordFormMap;
172 189
173 } // namespace content 190 } // namespace content
174 191
175 #endif // CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__ 192 #endif // CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698