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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 NO_SIGNAL_SENT, | 46 NO_SIGNAL_SENT, |
47 POSITIVE_SIGNAL_SENT, | 47 POSITIVE_SIGNAL_SENT, |
48 NEGATIVE_SIGNAL_SENT, | 48 NEGATIVE_SIGNAL_SENT, |
49 // Reserve a few values for future use. | 49 // Reserve a few values for future use. |
50 UNKNOWN_STATUS = 10 | 50 UNKNOWN_STATUS = 10 |
51 }; | 51 }; |
52 | 52 |
53 // Enum to differentiate between HTML form based authentication, and dialogs | 53 // Enum to differentiate between HTML form based authentication, and dialogs |
54 // using basic or digest schemes. Default is SCHEME_HTML. Only PasswordForms | 54 // using basic or digest schemes. Default is SCHEME_HTML. Only PasswordForms |
55 // of the same Scheme will be matched/autofilled against each other. | 55 // of the same Scheme will be matched/autofilled against each other. |
56 enum Scheme { | 56 enum Scheme : int { |
57 SCHEME_HTML, | 57 SCHEME_HTML, |
58 SCHEME_BASIC, | 58 SCHEME_BASIC, |
59 SCHEME_DIGEST, | 59 SCHEME_DIGEST, |
60 SCHEME_OTHER, | 60 SCHEME_OTHER, |
61 SCHEME_LAST = SCHEME_OTHER | 61 SCHEME_USERNAME_ONLY, |
| 62 |
| 63 SCHEME_LAST = SCHEME_USERNAME_ONLY |
62 } scheme; | 64 } scheme; |
63 | 65 |
64 // During form parsing, Chrome tries to partly understand the type of the form | 66 // During form parsing, Chrome tries to partly understand the type of the form |
65 // based on the layout of its fields. The result of this analysis helps to | 67 // based on the layout of its fields. The result of this analysis helps to |
66 // treat the form correctly once the low-level information is lost by | 68 // treat the form correctly once the low-level information is lost by |
67 // converting the web form into a PasswordForm. It is only used for observed | 69 // converting the web form into a PasswordForm. It is only used for observed |
68 // HTML forms, not for stored credentials. | 70 // HTML forms, not for stored credentials. |
69 enum class Layout { | 71 enum class Layout { |
70 // Forms which either do not need to be classified, or cannot be classified | 72 // Forms which either do not need to be classified, or cannot be classified |
71 // meaningfully. | 73 // meaningfully. |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; | 304 typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap; |
303 | 305 |
304 // For testing. | 306 // For testing. |
305 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); | 307 std::ostream& operator<<(std::ostream& os, PasswordForm::Layout layout); |
306 std::ostream& operator<<(std::ostream& os, const PasswordForm& form); | 308 std::ostream& operator<<(std::ostream& os, const PasswordForm& form); |
307 std::ostream& operator<<(std::ostream& os, PasswordForm* form); | 309 std::ostream& operator<<(std::ostream& os, PasswordForm* form); |
308 | 310 |
309 } // namespace autofill | 311 } // namespace autofill |
310 | 312 |
311 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ | 313 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__ |
OLD | NEW |