| Index: components/autofill/renderer/form_autofill_util.cc
|
| diff --git a/components/autofill/renderer/form_autofill_util.cc b/components/autofill/renderer/form_autofill_util.cc
|
| index 2d255df9dccb47500ee52dd06e6a9cb9f4e06a3f..acdd8cca6dbf884a95600e3662a2d1f11f6a550d 100644
|
| --- a/components/autofill/renderer/form_autofill_util.cc
|
| +++ b/components/autofill/renderer/form_autofill_util.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/command_line.h"
|
| #include "base/logging.h"
|
| #include "base/memory/scoped_vector.h"
|
| +#include "base/metrics/field_trial.h"
|
| #include "base/string_util.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "components/autofill/common/autofill_switches.h"
|
| @@ -80,14 +81,18 @@ bool IsAutofillableElement(const WebFormControlElement& element) {
|
| return IsAutofillableInputElement(input_element) || IsSelectElement(element);
|
| }
|
|
|
| +bool IsAutocheckoutEnabled() {
|
| + return base::FieldTrialList::FindFullName("Autocheckout") == "Yes" ||
|
| + CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableExperimentalFormFilling);
|
| +}
|
| +
|
| // Check whether the given field satisfies the REQUIRE_AUTOCOMPLETE requirement.
|
| // When Autocheckout is enabled, this requirement is enforced in the browser
|
| // process rather than in the renderer process, and hence all fields are
|
| // considered to satisfy this requirement.
|
| bool SatisfiesRequireAutocomplete(const WebInputElement& input_element) {
|
| - return input_element.autoComplete() ||
|
| - CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableExperimentalFormFilling);
|
| + return input_element.autoComplete() || IsAutocheckoutEnabled();
|
| }
|
|
|
| // Appends |suffix| to |prefix| so that any intermediary whitespace is collapsed
|
|
|