| Index: components/autofill/browser/form_structure.cc
|
| diff --git a/components/autofill/browser/form_structure.cc b/components/autofill/browser/form_structure.cc
|
| index 8dbf6bd5304ba8b2684ea32c8988d41eb32f53ca..005415aea41ab532fb2653ca718d3711e2d40c82 100644
|
| --- a/components/autofill/browser/form_structure.cc
|
| +++ b/components/autofill/browser/form_structure.cc
|
| @@ -609,12 +609,6 @@ void FormStructure::UpdateAutofillCount() {
|
| }
|
|
|
| bool FormStructure::ShouldBeParsed(bool require_method_post) const {
|
| - // Ignore counting checkable elements towards minimum number of elements
|
| - // required to parse. This avoids trying to crowdsource forms with few text
|
| - // or select elements.
|
| - if ((field_count() - checkable_field_count()) < RequiredFillableFields())
|
| - return false;
|
| -
|
| // Rule out http(s)://*/search?...
|
| // e.g. http://www.google.com/search?q=...
|
| // http://search.yahoo.com/search?p=...
|
| @@ -622,6 +616,12 @@ bool FormStructure::ShouldBeParsed(bool require_method_post) const {
|
| return false;
|
|
|
| if (!IsAutocheckoutEnabled()) {
|
| + // Ignore counting checkable elements towards minimum number of elements
|
| + // required to parse. This avoids trying to crowdsource forms with few text
|
| + // or select elements.
|
| + if ((field_count() - checkable_field_count()) < RequiredFillableFields())
|
| + return false;
|
| +
|
| // Make sure there is at least one text field when Autocheckout is
|
| // not enabled.
|
| bool has_text_field = false;
|
| @@ -637,7 +637,9 @@ bool FormStructure::ShouldBeParsed(bool require_method_post) const {
|
| }
|
|
|
| bool FormStructure::ShouldBeCrowdsourced() const {
|
| - return !has_author_specified_types_ && ShouldBeParsed(true);
|
| + // Allow all forms in Autocheckout flow to be crowdsourced.
|
| + return (!has_author_specified_types_ && ShouldBeParsed(true)) ||
|
| + IsAutocheckoutEnabled();
|
| }
|
|
|
| void FormStructure::UpdateFromCache(const FormStructure& cached_form) {
|
|
|