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_FILL_DATA_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_FILL_DATA_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_FILL_DATA_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_FILL_DATA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 }; | 32 }; |
33 | 33 |
34 // Structure used for autofilling password forms. Note that the realms in this | 34 // Structure used for autofilling password forms. Note that the realms in this |
35 // struct are only set when the password's realm differs from the realm of the | 35 // struct are only set when the password's realm differs from the realm of the |
36 // form that we are filling. | 36 // form that we are filling. |
37 struct PasswordFormFillData { | 37 struct PasswordFormFillData { |
38 typedef std::map<base::string16, PasswordAndRealm> LoginCollection; | 38 typedef std::map<base::string16, PasswordAndRealm> LoginCollection; |
39 typedef std::map<UsernamesCollectionKey, | 39 typedef std::map<UsernamesCollectionKey, |
40 std::vector<base::string16> > UsernamesCollection; | 40 std::vector<base::string16> > UsernamesCollection; |
41 | 41 |
42 // Identifies the HTML form on the page and preferred username/password for | 42 // The name of the form. |
43 // login. | 43 base::string16 name; |
44 FormData basic_data; | 44 |
| 45 // An origin is (scheme, host, port, path and fragment identifier) only; it is |
| 46 // just exactly a URL with the query string removed. |
| 47 GURL origin; |
| 48 |
| 49 // The action target of the form. |
| 50 GURL action; |
| 51 |
| 52 // True if this form was submitted by a user gesture and not javascript. |
| 53 bool user_submitted; |
| 54 |
| 55 // Username and password input fields in the form. |
| 56 FormFieldData username_field; |
| 57 FormFieldData password_field; |
45 | 58 |
46 // The signon realm of the preferred user/pass pair. | 59 // The signon realm of the preferred user/pass pair. |
47 std::string preferred_realm; | 60 std::string preferred_realm; |
48 | 61 |
49 // A list of other matching username->PasswordAndRealm pairs for the form. | 62 // A list of other matching username->PasswordAndRealm pairs for the form. |
50 LoginCollection additional_logins; | 63 LoginCollection additional_logins; |
51 | 64 |
52 // A list of possible usernames in the case where we aren't completely sure | 65 // A list of possible usernames in the case where we aren't completely sure |
53 // that the original saved username is correct. This data is keyed by the | 66 // that the original saved username is correct. This data is keyed by the |
54 // saved username/password to ensure uniqueness, though the username is not | 67 // saved username/password to ensure uniqueness, though the username is not |
(...skipping 23 matching lines...) Expand all Loading... |
78 const PasswordForm& form_on_page, | 91 const PasswordForm& form_on_page, |
79 const PasswordFormMap& matches, | 92 const PasswordFormMap& matches, |
80 const PasswordForm* const preferred_match, | 93 const PasswordForm* const preferred_match, |
81 bool wait_for_username_before_autofill, | 94 bool wait_for_username_before_autofill, |
82 bool enable_other_possible_usernames, | 95 bool enable_other_possible_usernames, |
83 PasswordFormFillData* result); | 96 PasswordFormFillData* result); |
84 | 97 |
85 } // namespace autofill | 98 } // namespace autofill |
86 | 99 |
87 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_FILL_DATA_H__ | 100 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_FILL_DATA_H__ |
OLD | NEW |