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 #include "components/autofill/core/common/password_form_fill_data.h" | 5 #include "components/autofill/core/common/password_form_fill_data.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "components/autofill/core/common/form_field_data.h" | 9 #include "components/autofill/core/common/form_field_data.h" |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 FormFieldData username_field; | 42 FormFieldData username_field; |
43 username_field.name = form_on_page.username_element; | 43 username_field.name = form_on_page.username_element; |
44 username_field.value = preferred_match->username_value; | 44 username_field.value = preferred_match->username_value; |
45 FormFieldData password_field; | 45 FormFieldData password_field; |
46 password_field.name = form_on_page.password_element; | 46 password_field.name = form_on_page.password_element; |
47 password_field.value = preferred_match->password_value; | 47 password_field.value = preferred_match->password_value; |
48 password_field.form_control_type = "password"; | 48 password_field.form_control_type = "password"; |
49 | 49 |
50 // Fill basic form data. | 50 // Fill basic form data. |
51 result->basic_data.origin = form_on_page.origin; | 51 result->basic_data.origin = form_on_page.origin; |
52 result->basic_data.action = form_on_page.action; | 52 result->basic_data.action = form_on_page.action; |
Ilya Sherman
2014/10/13 23:49:32
It looks like this class really shouldn't depend o
Pritam Nikam
2014/10/16 12:55:13
Sure, I'll take care this in next patch set.
Still
| |
53 result->basic_data.fields.push_back(username_field); | 53 result->basic_data.username = username_field; |
54 result->basic_data.fields.push_back(password_field); | 54 result->basic_data.password = password_field; |
55 result->wait_for_username = wait_for_username_before_autofill; | 55 result->wait_for_username = wait_for_username_before_autofill; |
56 | 56 |
57 result->preferred_realm = preferred_match->original_signon_realm; | 57 result->preferred_realm = preferred_match->original_signon_realm; |
58 | 58 |
59 // Copy additional username/value pairs. | 59 // Copy additional username/value pairs. |
60 PasswordFormMap::const_iterator iter; | 60 PasswordFormMap::const_iterator iter; |
61 for (iter = matches.begin(); iter != matches.end(); iter++) { | 61 for (iter = matches.begin(); iter != matches.end(); iter++) { |
62 if (iter->second != preferred_match) { | 62 if (iter->second != preferred_match) { |
63 PasswordAndRealm value; | 63 PasswordAndRealm value; |
64 value.password = iter->second->password_value; | 64 value.password = iter->second->password_value; |
(...skipping 10 matching lines...) Expand all Loading... | |
75 key.username = iter->first; | 75 key.username = iter->first; |
76 key.password = iter->second->password_value; | 76 key.password = iter->second->password_value; |
77 key.realm = iter->second->original_signon_realm; | 77 key.realm = iter->second->original_signon_realm; |
78 result->other_possible_usernames[key] = | 78 result->other_possible_usernames[key] = |
79 iter->second->other_possible_usernames; | 79 iter->second->other_possible_usernames; |
80 } | 80 } |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 } // namespace autofill | 84 } // namespace autofill |
OLD | NEW |