| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
| 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 6 #define COMPONENTS_AUTOFILL_CORE_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 20 matching lines...) Expand all Loading... |
| 31 // accurately. But it is not always possible, especially when importing from | 31 // accurately. But it is not always possible, especially when importing from |
| 32 // other browsers with different data models, to copy over all the information | 32 // other browsers with different data models, to copy over all the information |
| 33 // about a particular "saved password entry" to our PasswordForm | 33 // about a particular "saved password entry" to our PasswordForm |
| 34 // representation. | 34 // representation. |
| 35 // | 35 // |
| 36 // The field descriptions in the struct specification below are intended to | 36 // The field descriptions in the struct specification below are intended to |
| 37 // describe which fields are not strictly required when adding a saved password | 37 // describe which fields are not strictly required when adding a saved password |
| 38 // entry to the database and how they can affect the matching process. | 38 // entry to the database and how they can affect the matching process. |
| 39 | 39 |
| 40 struct PasswordForm { | 40 struct PasswordForm { |
| 41 // Enum to keep track of what information has been sent to the server about |
| 42 // this form regarding password generation. |
| 43 enum GenerationUploadStatus { |
| 44 NO_SIGNAL_SENT, |
| 45 POSITIVE_SIGNAL_SENT, |
| 46 NEGATIVE_SIGNAL_SENT, |
| 47 // Reserve a few values for future use. |
| 48 UNKNOWN_STATUS = 10 |
| 49 }; |
| 50 |
| 41 // Enum to differentiate between HTML form based authentication, and dialogs | 51 // Enum to differentiate between HTML form based authentication, and dialogs |
| 42 // using basic or digest schemes. Default is SCHEME_HTML. Only PasswordForms | 52 // using basic or digest schemes. Default is SCHEME_HTML. Only PasswordForms |
| 43 // of the same Scheme will be matched/autofilled against each other. | 53 // of the same Scheme will be matched/autofilled against each other. |
| 44 enum Scheme { | 54 enum Scheme { |
| 45 SCHEME_HTML, | 55 SCHEME_HTML, |
| 46 SCHEME_BASIC, | 56 SCHEME_BASIC, |
| 47 SCHEME_DIGEST, | 57 SCHEME_DIGEST, |
| 48 SCHEME_OTHER, | 58 SCHEME_OTHER, |
| 49 SCHEME_LAST = SCHEME_OTHER | 59 SCHEME_LAST = SCHEME_OTHER |
| 50 } scheme; | 60 } scheme; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 // When parsing an HTML form, this is not used. | 210 // When parsing an HTML form, this is not used. |
| 201 int times_used; | 211 int times_used; |
| 202 | 212 |
| 203 // Autofill representation of this form. Used to communicate with the | 213 // Autofill representation of this form. Used to communicate with the |
| 204 // Autofill servers if necessary. Currently this is only used to help | 214 // Autofill servers if necessary. Currently this is only used to help |
| 205 // determine forms where we can trigger password generation. | 215 // determine forms where we can trigger password generation. |
| 206 // | 216 // |
| 207 // When parsing an HTML form, this is normally set. | 217 // When parsing an HTML form, this is normally set. |
| 208 FormData form_data; | 218 FormData form_data; |
| 209 | 219 |
| 220 // What information has been sent to the Autofill server about this form. |
| 221 GenerationUploadStatus generation_upload_status; |
| 222 |
| 210 // These following fields are set by a website using the Credential Manager | 223 // These following fields are set by a website using the Credential Manager |
| 211 // API. They will be empty and remain unused for sites which do not use that | 224 // API. They will be empty and remain unused for sites which do not use that |
| 212 // API. | 225 // API. |
| 213 // | 226 // |
| 214 // User friendly name to show in the UI. | 227 // User friendly name to show in the UI. |
| 215 base::string16 display_name; | 228 base::string16 display_name; |
| 216 | 229 |
| 217 // The URL of the user's avatar to display in the UI. | 230 // The URL of the user's avatar to display in the UI. |
| 218 GURL avatar_url; | 231 GURL avatar_url; |
| 219 | 232 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 241 | 254 |
| 242 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; | 255 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; |
| 243 | 256 |
| 244 // For testing. | 257 // For testing. |
| 245 std::ostream& operator<<(std::ostream& os, | 258 std::ostream& operator<<(std::ostream& os, |
| 246 const autofill::PasswordForm& form); | 259 const autofill::PasswordForm& form); |
| 247 | 260 |
| 248 } // namespace autofill | 261 } // namespace autofill |
| 249 | 262 |
| 250 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 263 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
| OLD | NEW |