Commit 3b9708f1 authored by Christoph Schwering's avatar Christoph Schwering Committed by Chromium LUCI CQ

[Autofill] Added kill switches for filling and import.

This CL adds two features which, if enabled, suppress filling and form
import.

Bug: 1166660
Change-Id: Ia4e29345be0a1f638bb3650d7baf1bde9dc35fd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627164
Commit-Queue: Christoph Schwering <schwering@google.com>
Reviewed-by: default avatarMatthias Körber <koerber@google.com>
Cr-Commit-Position: refs/heads/master@{#843606}
parent 040e9749
......@@ -754,6 +754,10 @@ void AutofillManager::OnFormSubmittedImpl(const FormData& form,
return;
}
if (base::FeatureList::IsEnabled(features::kAutofillDisableImport)) {
return;
}
// Update Personal Data with the form's submitted data.
// Also triggers offering local/upload credit card save, if applicable.
client_->GetFormDataImporter()->ImportFormData(*submitted_form,
......@@ -944,6 +948,10 @@ void AutofillManager::OnQueryFormFieldAutofillImpl(
const FormFieldData& field,
const gfx::RectF& transformed_box,
bool autoselect_first_suggestion) {
if (base::FeatureList::IsEnabled(features::kAutofillDisableFilling)) {
return;
}
SetDataList(field.datalist_values, field.datalist_labels);
external_delegate_->OnQuery(query_id, form, field, transformed_box);
......
......@@ -54,6 +54,14 @@ const base::Feature kAutofillCacheQueryResponses{
const base::Feature kAutofillCreateDataForTest{
"AutofillCreateDataForTest", base::FEATURE_DISABLED_BY_DEFAULT};
// Kill switch for Autofill filling.
const base::Feature kAutofillDisableFilling{"AutofillDisableFilling",
base::FEATURE_DISABLED_BY_DEFAULT};
// Kill switch for Autofill import.
const base::Feature kAutofillDisableImport{"AutofillDisableImport",
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{
......
......@@ -27,6 +27,8 @@ extern const base::Feature kAutofillAllowDuplicateFormSubmissions;
extern const base::Feature kAutofillAllowNonHttpActivation;
extern const base::Feature kAutofillCacheQueryResponses;
extern const base::Feature kAutofillCreateDataForTest;
extern const base::Feature kAutofillDisableFilling;
extern const base::Feature kAutofillDisableImport;
extern const base::Feature kAutofillEnableAccountWalletStorage;
extern const base::Feature kAutofillEnableAugmentedPhoneCountryCode;
extern const base::Feature kAutofillEnableDependentLocalityParsing;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment