| 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/content/renderer/form_cache.h" | 5 #include "components/autofill/content/renderer/form_cache.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/autofill/content/renderer/form_autofill_util.h" | 10 #include "components/autofill/content/renderer/form_autofill_util.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 GetUnownedAutofillableFormFieldElements(document.all(), &fieldsets); | 126 GetUnownedAutofillableFormFieldElements(document.all(), &fieldsets); |
| 127 | 127 |
| 128 size_t num_editable_elements = | 128 size_t num_editable_elements = |
| 129 ScanFormControlElements(control_elements, log_deprecation_messages); | 129 ScanFormControlElements(control_elements, log_deprecation_messages); |
| 130 | 130 |
| 131 if (ShouldIgnoreForm(num_editable_elements, control_elements.size())) | 131 if (ShouldIgnoreForm(num_editable_elements, control_elements.size())) |
| 132 return forms; | 132 return forms; |
| 133 | 133 |
| 134 FormData synthetic_form; | 134 FormData synthetic_form; |
| 135 if (!UnownedFormElementsAndFieldSetsToFormData( | 135 if (!UnownedFormElementsAndFieldSetsToFormData( |
| 136 fieldsets, control_elements, nullptr, document.url(), extract_mask, | 136 fieldsets, control_elements, nullptr, document, extract_mask, |
| 137 &synthetic_form, nullptr)) { | 137 &synthetic_form, nullptr)) { |
| 138 return forms; | 138 return forms; |
| 139 } | 139 } |
| 140 | 140 |
| 141 num_fields_seen += synthetic_form.fields.size(); | 141 num_fields_seen += synthetic_form.fields.size(); |
| 142 if (num_fields_seen > kMaxParseableFields) | 142 if (num_fields_seen > kMaxParseableFields) |
| 143 return forms; | 143 return forms; |
| 144 | 144 |
| 145 if (synthetic_form.fields.size() >= kRequiredAutofillFields && | 145 if (synthetic_form.fields.size() >= kRequiredAutofillFields && |
| 146 !parsed_forms_.count(synthetic_form)) { | 146 !parsed_forms_.count(synthetic_form)) { |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 std::make_pair(input_element, input_element.isChecked())); | 315 std::make_pair(input_element, input_element.isChecked())); |
| 316 } else { | 316 } else { |
| 317 ++num_editable_elements; | 317 ++num_editable_elements; |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 return num_editable_elements; | 321 return num_editable_elements; |
| 322 } | 322 } |
| 323 | 323 |
| 324 } // namespace autofill | 324 } // namespace autofill |
| OLD | NEW |