diff options
Diffstat (limited to 'chromium/components/autofill/core/common/autofill_features.cc')
-rw-r--r-- | chromium/components/autofill/core/common/autofill_features.cc | 150 |
1 files changed, 119 insertions, 31 deletions
diff --git a/chromium/components/autofill/core/common/autofill_features.cc b/chromium/components/autofill/core/common/autofill_features.cc index 349361c1c7b..866f6a9274a 100644 --- a/chromium/components/autofill/core/common/autofill_features.cc +++ b/chromium/components/autofill/core/common/autofill_features.cc @@ -12,6 +12,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" +#include "build/chromeos_buildflags.h" #include "components/autofill/core/common/autofill_prefs.h" #include "components/autofill/core/common/autofill_switches.h" #include "components/prefs/pref_service.h" @@ -20,6 +21,12 @@ namespace autofill { namespace features { +// Controls if Autocomplete suggestions are only shown/stored for meaningful +// field names. +// TODO(crbug.com/1181759): Remove once launched. +const base::Feature kAutocompleteFilterForMeaningfulNames{ + "AutocompleteFilterForMeaningfulNames", base::FEATURE_DISABLED_BY_DEFAULT}; + // Controls if Autofill sends votes for the new address types. const base::Feature kAutofillAddressEnhancementVotes{ "kAutofillAddressEnhancementVotes", base::FEATURE_DISABLED_BY_DEFAULT}; @@ -45,16 +52,6 @@ const base::Feature kAutofillAllowDuplicateFormSubmissions{ const base::Feature kAutofillAllowNonHttpActivation{ "AutofillAllowNonHttpActivation", base::FEATURE_DISABLED_BY_DEFAULT}; -const base::Feature kAutofillAlwaysFillAddresses{ - "AlwaysFillAddresses", base::FEATURE_ENABLED_BY_DEFAULT}; - -// Controls whether negative patterns are used to parse the field type. -// TODO(crbug.com/1132831): Remove once launched. -const base::Feature - kAutofillApplyNegativePatternsForFieldTypeDetectionHeuristics{ - "AutofillApplyNegativePatternsForFieldTypeDetectionHeuristics", - base::FEATURE_DISABLED_BY_DEFAULT}; - // Controls the use of GET (instead of POST) to fetch cacheable autofill query // responses. const base::Feature kAutofillCacheQueryResponses{ @@ -63,12 +60,32 @@ const base::Feature kAutofillCacheQueryResponses{ const base::Feature kAutofillCreateDataForTest{ "AutofillCreateDataForTest", base::FEATURE_DISABLED_BY_DEFAULT}; +// Controls if the heuristic field parsing utilizes shared labels. +// TODO(crbug/1165780): Remove once shared labels are launched. +const base::Feature kAutofillEnableSupportForParsingWithSharedLabels{ + "AutofillEnableSupportForParsingWithSharedLabels", + base::FEATURE_DISABLED_BY_DEFAULT}; + +// Kill switch for Autofill filling. +const base::Feature kAutofillDisableFilling{"AutofillDisableFilling", + base::FEATURE_DISABLED_BY_DEFAULT}; + +// Kill switch for Autofill address import. +const base::Feature kAutofillDisableAddressImport{ + "AutofillDisableAddressImport", base::FEATURE_DISABLED_BY_DEFAULT}; + +// Controls if Chrome support filling and importing apartment numbers. +// TODO(crbug.com/1153715): Remove once launched. +const base::Feature kAutofillEnableSupportForApartmentNumbers{ + "AutofillEnableSupportForApartmentNumbers", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Controls whether we download server credit cards to the ephemeral // account-based storage when sync the transport is enabled. const base::Feature kAutofillEnableAccountWalletStorage { "AutofillEnableAccountWalletStorage", -#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_IOS) - // Wallet transport is only currently available on Win/Mac/Linux. +#if BUILDFLAG(IS_CHROMEOS_ASH) || defined(OS_IOS) + // Wallet transport is only currently available on Win/Mac/Linux/Android. // (Somehow, swapping this check makes iOS unhappy?) base::FEATURE_DISABLED_BY_DEFAULT #else @@ -78,14 +95,28 @@ const base::Feature kAutofillEnableAccountWalletStorage { // Controls whether to detect and fill the augmented phone country code field // when enabled. +// TODO(crbug.com/1150890) Remove once launched const base::Feature kAutofillEnableAugmentedPhoneCountryCode{ "AutofillEnableAugmentedPhoneCountryCode", base::FEATURE_DISABLED_BY_DEFAULT}; +// Controls if Autofill parses ADDRESS_HOME_DEPENDENT_LOCALITY. +// TODO(crbug.com/1157405): Remove once launched. +const base::Feature kAutofillEnableDependentLocalityParsing{ + "AutofillEnableDependentLocalityParsing", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Controls whether we show "Hide suggestions" item in the suggestions menu. const base::Feature kAutofillEnableHideSuggestionsUI{ "AutofillEnableHideSuggestionsUI", base::FEATURE_DISABLED_BY_DEFAULT}; +// Controls whether to save the first number in a form with multiple phone +// numbers instead of aborting the import. +// TODO(crbug.com/1167484) Remove once launched +const base::Feature kAutofillEnableImportWhenMultiplePhoneNumbers{ + "AutofillEnableImportWhenMultiplePhoneNumbers", + base::FEATURE_DISABLED_BY_DEFAULT}; + // When enabled and user has single account, a footer indicating user's e-mail // address and profile picture will appear at the bottom of InfoBars which has // corresponding account indication footer flags on. @@ -101,6 +132,14 @@ const base::Feature kAutofillEnableInfoBarAccountIndicationFooterForSyncUsers{ "AutofillEnableInfoBarAccountIndicationFooterForSyncUsers", base::FEATURE_DISABLED_BY_DEFAULT}; +// When enabled, the precedence is given to the field label over the name when +// they match different types. Applied only for parsing of address forms in +// Turkish. +// TODO(crbug.com/1156315): Remove once launched. +const base::Feature kAutofillEnableLabelPrecedenceForTurkishAddresses{ + "AutofillEnableLabelPrecedenceForTurkishAddresses", + base::FEATURE_DISABLED_BY_DEFAULT}; + // When enabled and user is signed in, a footer indicating user's e-mail address // and profile picture will appear at the bottom of corresponding password // InfoBars. @@ -108,6 +147,11 @@ const base::Feature kAutofillEnablePasswordInfoBarAccountIndicationFooter{ "AutofillEnablePasswordInfoBarAccountIndicationFooter", base::FEATURE_DISABLED_BY_DEFAULT}; +// When enabled, the address profile deduplication logic runs after the browser +// startup, once per chrome version. +const base::Feature kAutofillEnableProfileDeduplication{ + "AutofillEnableProfileDeduplication", base::FEATURE_DISABLED_BY_DEFAULT}; + // Controls if Autofill supports new structure in names. // TODO(crbug.com/1098943): Remove once launched. const base::Feature kAutofillEnableSupportForMoreStructureInNames{ @@ -129,9 +173,9 @@ const base::Feature kAutofillEnableSupportForMergingSubsetNames{ // Controls whether honorific prefix is shown and editable in Autofill Settings // on Android, iOS and Desktop. // TODO(crbug.com/1141460): Remove once launched. -const base::Feature kAutofillEnableUIForHonorificPrefixesInSettings{ - "AutofillEnableUIForHonorificPrefixesInSettings", - base::FEATURE_DISABLED_BY_DEFAULT}; +const base::Feature kAutofillEnableSupportForHonorificPrefixes{ + "AutofillEnableSupportForHonorificPrefixes", + base::FEATURE_DISABLED_BY_DEFAULT}; // Controls whether or not all datalist shall be extracted into FormFieldData. // This feature is enabled in both WebView and WebLayer where all datalists @@ -148,6 +192,12 @@ const base::Feature kAutofillExtractAllDatalists{ const base::Feature kAutofillFixFillableFieldTypes{ "AutofillFixFillableFieldTypes", base::FEATURE_DISABLED_BY_DEFAULT}; +// Controls if a server prediction with a prediction source |OVERRIDE| is +// granted precedence over html type attributes. +// TODO(crbug.com/1170384) Remove once launched +const base::Feature kAutofillServerTypeTakesPrecedence{ + "AutofillServerTypeTakesPrecedence", base::FEATURE_DISABLED_BY_DEFAULT}; + // When enabled, Autofill will use FormRendererIds instead of // GetIdentifierForRefill() to identify forms during refills. // TODO(crbug/896689): Remove once experiment is finished. @@ -160,12 +210,12 @@ const base::Feature kAutofillRefillWithRendererIds{ const base::Feature kAutofillNameSectionsWithRendererIds{ "AutofillNameSectionsWithRendererIds", base::FEATURE_DISABLED_BY_DEFAULT}; -// When enabled, autofill suggestions are displayed in the keyboard accessory +// When enabled, Autofill suggestions are displayed in the keyboard accessory // instead of the regular popup. const base::Feature kAutofillKeyboardAccessory{ "AutofillKeyboardAccessory", base::FEATURE_DISABLED_BY_DEFAULT}; -// When enabled, autofill will use new logic to strip both prefixes +// When enabled, Autofill will use new logic to strip both prefixes // and suffixes when setting FormStructure::parseable_name_ extern const base::Feature kAutofillLabelAffixRemoval{ "AutofillLabelAffixRemoval", base::FEATURE_DISABLED_BY_DEFAULT}; @@ -176,13 +226,33 @@ const base::Feature kAutofillPruneSuggestions{ const base::Feature kAutofillMetadataUploads{"AutofillMetadataUploads", base::FEATURE_DISABLED_BY_DEFAULT}; -const base::Feature kAutofillOffNoServerData{"AutofillOffNoServerData", - base::FEATURE_DISABLED_BY_DEFAULT}; +// When enabled, Autofill will load remote patterns via the component updater. +// TODO(crbug/1121990): Remove once launched. +extern const base::Feature kAutofillParsingPatternsFromRemote{ + "AutofillParsingPatternsFromRemote", base::FEATURE_DISABLED_BY_DEFAULT}; + +// Enables detection of language from Translate. +// TODO(crbug/1150895): Cleanup when launched. +const base::Feature kAutofillParsingPatternsLanguageDetection{ + "AutofillParsingPatternsLanguageDetection", + base::FEATURE_DISABLED_BY_DEFAULT}; + +// Controls whether negative patterns are used to parse the field type. +// TODO(crbug.com/1132831): Remove once launched. +const base::Feature kAutofillParsingPatternsNegativeMatching{ + "AutofillParsingPatternsNegativeMatching", + base::FEATURE_DISABLED_BY_DEFAULT}; + +// Controls whether page language is used to match patterns. +// TODO(crbug.com/1134496): Remove once launched. +const base::Feature kAutofillParsingPatternsLanguageDependent{ + "AutofillParsingPatternsLanguageDependent", + base::FEATURE_DISABLED_BY_DEFAULT}; -// If feature is enabled, autofill will be disabled for mixed forms (forms on +// If feature is enabled, Autofill will be disabled for mixed forms (forms on // HTTPS sites that submit over HTTP). const base::Feature kAutofillPreventMixedFormsFilling{ - "AutofillPreventMixedFormsFilling", base::FEATURE_DISABLED_BY_DEFAULT}; + "AutofillPreventMixedFormsFilling", base::FEATURE_ENABLED_BY_DEFAULT}; // If the feature is enabled, FormTracker's probable-form-submission detection // is disabled and replaced with browser-side detection. @@ -194,6 +264,11 @@ const base::Feature kAutofillProbableFormSubmissionInBrowser{ const base::Feature kAutofillProfileClientValidation{ "AutofillProfileClientValidation", base::FEATURE_DISABLED_BY_DEFAULT}; +// TODO(crbug.com/1101280): Remove once feature is tested. +const base::Feature kAutofillProfileImportFromUnfocusableFields{ + "AutofillProfileImportFromUnfocusableFields", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Controls whether Autofill uses server-side validation to ensure that fields // with invalid data are not suggested. const base::Feature kAutofillProfileServerValidation{ @@ -206,6 +281,11 @@ const base::Feature kAutofillRestrictUnownedFieldsToFormlessCheckout{ "AutofillRestrictUnownedFieldsToFormlessCheckout", base::FEATURE_DISABLED_BY_DEFAULT}; +// Controls whether or not overall prediction are retrieved from the cache. +const base::Feature kAutofillRetrieveOverallPredictionsFromCache{ + "AutofillRetrieveOverallPredictionsFromCache", + base::FEATURE_DISABLED_BY_DEFAULT}; + // On Canary and Dev channels only, this feature flag instructs chrome to send // rich form/field metadata with queries. This will trigger the use of richer // field-type predictions model on the server, for testing/evaluation of those @@ -241,10 +321,11 @@ const base::Feature kAutofillShowTypePredictions{ const base::Feature kAutofillSkipComparingInferredLabels{ "AutofillSkipComparingInferredLabels", base::FEATURE_DISABLED_BY_DEFAULT}; -// Controls whether to skip fields whose last seen value differs from the -// initially value. -const base::Feature kAutofillSkipFillingFieldsWithChangedValues{ - "AutofillSkipFillingFieldsWithChangedValues", +// Controls whether we require an expiration date or verification field when a +// name field is detected for a credit card, but we aren't confident it's not +// a non-credit card specific name field. +const base::Feature kAutofillStrictContextualCardNameConditions{ + "AutofillStrictContextualCardNameConditions", base::FEATURE_DISABLED_BY_DEFAULT}; // Controls whether Autofill should search prefixes of all words/tokens when @@ -274,12 +355,6 @@ const base::Feature kAutofillUseImprovedLabelDisambiguation{ const base::Feature kAutofillUseNewSectioningMethod{ "AutofillUseNewSectioningMethod", base::FEATURE_DISABLED_BY_DEFAULT}; -// Controls whether page language is used to match patterns. -// TODO(crbug.com/1134496): Remove once launched. -const base::Feature kAutofillUsePageLanguageToSelectFieldParsingPatterns{ - "AutofillUsePageLanguageToSelectFieldParsingPatterns", - base::FEATURE_DISABLED_BY_DEFAULT}; - #if defined(OS_ANDROID) // Controls whether the Autofill manual fallback for Addresses and Payments is // present on Android. @@ -306,9 +381,22 @@ const char kAutofillUseMobileLabelDisambiguationParameterShowOne[] = "show-one"; // TODO(crbug/1131038): Remove once it's launched. const base::Feature kAutofillUseUniqueRendererIDsOnIOS{ "AutofillUseUniqueRendererIDsOnIOS", base::FEATURE_DISABLED_BY_DEFAULT}; + +// Controls whether the creation of new address profiles is enabled in settings +// on IOS. +// TODO(crbug/1167105): Remove once it's launched. +const base::Feature kAutofillEnableNewAddressProfileCreationInSettingsOnIOS{ + "AutofillEnableNewAddressProfileCreationInSettingsOnIOS", + base::FEATURE_DISABLED_BY_DEFAULT}; #endif #if defined(OS_ANDROID) +// Controls whether Android autofill (WebView and WebLayer) should query the +// Autofill server for the server field type predictions and send them to +// Android autofill service. +const base::Feature kAndroidAutofillQueryServerFieldTypes{ + "AndroidAutofillQueryServerFieldTypes", base::FEATURE_DISABLED_BY_DEFAULT}; + // Controls whether the Wallet (GPay) integration requires first-sync-setup to // be complete. // TODO(crbug.com/1134564): Clean up after launch. |