| 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). |
| 59 // This realm is only set if this is not a perfect match for same origin |
| 60 // matching and instead just a domain that matches the same domain using the |
| 61 // PSL. |
| 62 std::string original_signon_realm; |
| 63 |
| 57 // The URL (minus query parameters) containing the form. This is the primary | 64 // The URL (minus query parameters) containing the form. This is the primary |
| 58 // data used by the PasswordManager to decide (in longest matching prefix | 65 // 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 | 66 // 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. | 67 // good fit for a particular form on a page, so it must not be empty. |
| 61 GURL origin; | 68 GURL origin; |
| 62 | 69 |
| 63 // The action target of the form. This is the primary data used by the | 70 // 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 | 71 // 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. | 72 // 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" | 73 // If this is empty / not available, it will result in a "restricted" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 163 |
| 157 // The form type. Not used yet. Please see http://crbug.com/152422 | 164 // The form type. Not used yet. Please see http://crbug.com/152422 |
| 158 Type type; | 165 Type type; |
| 159 | 166 |
| 160 // The number of times that this username/password has been used to | 167 // The number of times that this username/password has been used to |
| 161 // authenticate the user. | 168 // authenticate the user. |
| 162 // | 169 // |
| 163 // When parsing an HTML form, this is not used. | 170 // When parsing an HTML form, this is not used. |
| 164 int times_used; | 171 int times_used; |
| 165 | 172 |
| 173 // Tracks if this is not a perfect match for same origin matching and instead |
| 174 // just a domain that matches the same origin policy using the PSL domain. |
| 175 bool is_psl_origin_match; |
| 176 |
| 166 PasswordForm(); | 177 PasswordForm(); |
| 167 ~PasswordForm(); | 178 ~PasswordForm(); |
| 168 }; | 179 }; |
| 169 | 180 |
| 170 // Map username to PasswordForm* for convenience. See password_form_manager.h. | 181 // Map username to PasswordForm* for convenience. See password_form_manager.h. |
| 171 typedef std::map<string16, PasswordForm*> PasswordFormMap; | 182 typedef std::map<string16, PasswordForm*> PasswordFormMap; |
| 172 | 183 |
| 173 } // namespace content | 184 } // namespace content |
| 174 | 185 |
| 175 #endif // CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__ | 186 #endif // CONTENT_PUBLIC_COMMON_PASSWORD_FORM_H__ |
| OLD | NEW |