| 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 27 matching lines...) Expand all Loading... |
| 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 differentiate between HTML form based authentication, and dialogs | 41 // Enum to differentiate between HTML form based authentication, and dialogs |
| 42 // using basic or digest schemes. Default is SCHEME_HTML. Only PasswordForms | 42 // using basic or digest schemes. Default is SCHEME_HTML. Only PasswordForms |
| 43 // of the same Scheme will be matched/autofilled against each other. | 43 // of the same Scheme will be matched/autofilled against each other. |
| 44 enum Scheme { | 44 enum Scheme { |
| 45 SCHEME_HTML, | 45 SCHEME_HTML, |
| 46 SCHEME_BASIC, | 46 SCHEME_BASIC, |
| 47 SCHEME_DIGEST, | 47 SCHEME_DIGEST, |
| 48 SCHEME_OTHER | 48 SCHEME_OTHER, |
| 49 SCHEME_LAST = SCHEME_OTHER |
| 49 } scheme; | 50 } scheme; |
| 50 | 51 |
| 51 // The "Realm" for the sign-on (scheme, host, port for SCHEME_HTML, and | 52 // The "Realm" for the sign-on (scheme, host, port for SCHEME_HTML, and |
| 52 // contains the HTTP realm for dialog-based forms). | 53 // contains the HTTP realm for dialog-based forms). |
| 53 // The signon_realm is effectively the primary key used for retrieving | 54 // The signon_realm is effectively the primary key used for retrieving |
| 54 // data from the database, so it must not be empty. | 55 // data from the database, so it must not be empty. |
| 55 std::string signon_realm; | 56 std::string signon_realm; |
| 56 | 57 |
| 57 // The original "Realm" for the sign-on (scheme, host, port for SCHEME_HTML, | 58 // 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 // and contains the HTTP realm for dialog-based forms). This realm is only set |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // Map username to PasswordForm* for convenience. See password_form_manager.h. | 216 // Map username to PasswordForm* for convenience. See password_form_manager.h. |
| 216 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; | 217 typedef std::map<base::string16, PasswordForm*> PasswordFormMap; |
| 217 | 218 |
| 218 // For testing. | 219 // For testing. |
| 219 std::ostream& operator<<(std::ostream& os, | 220 std::ostream& operator<<(std::ostream& os, |
| 220 const autofill::PasswordForm& form); | 221 const autofill::PasswordForm& form); |
| 221 | 222 |
| 222 } // namespace autofill | 223 } // namespace autofill |
| 223 | 224 |
| 224 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 225 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
| OLD | NEW |