| Index: chrome/browser/autofill/form_structure.cc
|
| diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
|
| index d1ca6d10bedf80cc2b56709590438e5c04e0025c..d742eeb4a80ce0055e1f13d2ef00b66b8191a67b 100644
|
| --- a/chrome/browser/autofill/form_structure.cc
|
| +++ b/chrome/browser/autofill/form_structure.cc
|
| @@ -222,14 +222,15 @@ AutofillFieldType FieldTypeFromAutocompleteType(
|
|
|
| } // namespace
|
|
|
| -FormStructure::FormStructure(const FormData& form)
|
| +FormStructure::FormStructure(const FormData& form, bool autocheckout_enabled)
|
| : form_name_(form.name),
|
| source_url_(form.origin),
|
| target_url_(form.action),
|
| autofill_count_(0),
|
| upload_required_(USE_UPLOAD_RATES),
|
| server_experiment_id_("no server response"),
|
| - has_author_specified_types_(false) {
|
| + has_author_specified_types_(false),
|
| + autocheckout_enabled_(autocheckout_enabled) {
|
| // Copy the form fields.
|
| std::map<string16, size_t> unique_names;
|
| for (std::vector<FormFieldData>::const_iterator field =
|
| @@ -522,10 +523,7 @@ std::string FormStructure::FormSignature() const {
|
| }
|
|
|
| bool FormStructure::IsAutofillable(bool require_method_post) const {
|
| - // TODO(ramankk): Remove this check once we have better way of identifying the
|
| - // cases to trigger experimental form filling.
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableExperimentalFormFilling))
|
| + if (autocheckout_enabled_)
|
| return true;
|
|
|
| if (autofill_count() < kRequiredFillableFields)
|
| @@ -545,10 +543,7 @@ void FormStructure::UpdateAutofillCount() {
|
| }
|
|
|
| bool FormStructure::ShouldBeParsed(bool require_method_post) const {
|
| - // TODO(ramankk): Remove this check once we have better way of identifying the
|
| - // cases to trigger experimental form filling.
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableExperimentalFormFilling))
|
| + if (autocheckout_enabled_)
|
| return true;
|
|
|
| if (field_count() < kRequiredFillableFields)
|
|
|