OLD | NEW |
---|---|
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 Loading... | |
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 "Realm" for the sign-on (scheme, host, port for SCHEME_HTML, and | |
58 // contains the HTTP realm for dialog-based forms). This realm is only set | |
59 // to a non-empty value if this is not a perfect match for same origin | |
60 // matching and instead just a match using the public suffix. In that case, | |
61 // this must be set to where this PasswordForm data originated from. | |
62 // For example, if you have a password for http://www.foo.bar (where .bar is | |
palmer
2013/06/11 18:55:45
Document here what our scheme-matching (HTTP vs. H
nyquist
2013/06/11 23:54:43
Done.
| |
63 // the public suffix) and it shows up on http://m.foo.bar, | |
64 // |original_signon_realm| must be set to http://www.foo.bar. | |
65 std::string original_signon_realm; | |
66 | |
57 // The URL (minus query parameters) containing the form. This is the primary | 67 // The URL (minus query parameters) containing the form. This is the primary |
58 // data used by the PasswordManager to decide (in longest matching prefix | 68 // 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 | 69 // 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. | 70 // good fit for a particular form on a page, so it must not be empty. |
61 GURL origin; | 71 GURL origin; |
62 | 72 |
63 // The action target of the form. This is the primary data used by the | 73 // 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 | 74 // 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. | 75 // 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" | 76 // If this is empty / not available, it will result in a "restricted" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 PasswordForm(); | 176 PasswordForm(); |
167 ~PasswordForm(); | 177 ~PasswordForm(); |
168 }; | 178 }; |
169 | 179 |
170 // Map username to PasswordForm* for convenience. See password_form_manager.h. | 180 // Map username to PasswordForm* for convenience. See password_form_manager.h. |
171 typedef std::map<string16, PasswordForm*> PasswordFormMap; | 181 typedef std::map<string16, PasswordForm*> PasswordFormMap; |
172 | 182 |
173 } // namespace content | 183 } // namespace content |
174 | 184 |
175 #endif // CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__ | 185 #endif // CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__ |
OLD | NEW |