| 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/browser/form_structure.h" | 5 #include "components/autofill/core/browser/form_structure.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 } | 1152 } |
| 1153 | 1153 |
| 1154 added_field->set_signature(field->GetFieldSignature()); | 1154 added_field->set_signature(field->GetFieldSignature()); |
| 1155 | 1155 |
| 1156 if (IsAutofillFieldMetadataEnabled()) { | 1156 if (IsAutofillFieldMetadataEnabled()) { |
| 1157 added_field->set_type(field->form_control_type); | 1157 added_field->set_type(field->form_control_type); |
| 1158 | 1158 |
| 1159 if (!field->name.empty()) | 1159 if (!field->name.empty()) |
| 1160 added_field->set_name(base::UTF16ToUTF8(field->name)); | 1160 added_field->set_name(base::UTF16ToUTF8(field->name)); |
| 1161 | 1161 |
| 1162 if (!field->id.empty()) |
| 1163 added_field->set_id(base::UTF16ToUTF8(field->id)); |
| 1164 |
| 1162 if (!field->autocomplete_attribute.empty()) | 1165 if (!field->autocomplete_attribute.empty()) |
| 1163 added_field->set_autocomplete(field->autocomplete_attribute); | 1166 added_field->set_autocomplete(field->autocomplete_attribute); |
| 1164 | 1167 |
| 1165 if (!field->css_classes.empty()) | 1168 if (!field->css_classes.empty()) |
| 1166 added_field->set_css_classes(base::UTF16ToUTF8(field->css_classes)); | 1169 added_field->set_css_classes(base::UTF16ToUTF8(field->css_classes)); |
| 1167 | 1170 |
| 1168 if (field->properties_mask) | 1171 if (field->properties_mask) |
| 1169 added_field->set_properties_mask(field->properties_mask); | 1172 added_field->set_properties_mask(field->properties_mask); |
| 1170 } | 1173 } |
| 1171 } | 1174 } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 filtered_strings[0].at(prefix_len)) { | 1320 filtered_strings[0].at(prefix_len)) { |
| 1318 // Mismatch found. | 1321 // Mismatch found. |
| 1319 return filtered_strings[i].substr(0, prefix_len); | 1322 return filtered_strings[i].substr(0, prefix_len); |
| 1320 } | 1323 } |
| 1321 } | 1324 } |
| 1322 } | 1325 } |
| 1323 return filtered_strings[0]; | 1326 return filtered_strings[0]; |
| 1324 } | 1327 } |
| 1325 | 1328 |
| 1326 } // namespace autofill | 1329 } // namespace autofill |
| OLD | NEW |