Commit 5e0736a7 authored by Matthias Körber's avatar Matthias Körber Committed by Commit Bot

Introduced Finch experiment for ignoring CVC server predictions.

Bug: 1021543
Change-Id: I794550c57e46d78bbca1ae9ec857e2a27d338874
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899779
Auto-Submit: Matthias Körber <koerber@google.com>
Commit-Queue: Matthias Körber <koerber@google.com>
Reviewed-by: default avatarMaxim Kolosovskiy <kolos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712720}
parent 76acfd8e
...@@ -823,6 +823,14 @@ void FormStructure::ProcessQueryResponse( ...@@ -823,6 +823,14 @@ void FormStructure::ProcessQueryResponse(
if (heuristic_type != UNKNOWN_TYPE) if (heuristic_type != UNKNOWN_TYPE)
heuristics_detected_fillable_field = true; heuristics_detected_fillable_field = true;
// Clears the server prediction for CVC-fields if the corresponding Finch
// feature is not enabled.
if (!base::FeatureList::IsEnabled(
autofill::features::kAutofillUseServerCVCPrediction) &&
field_type == ServerFieldType::CREDIT_CARD_VERIFICATION_CODE) {
field_type = ServerFieldType::NO_SERVER_DATA;
}
field->set_server_type(field_type); field->set_server_type(field_type);
std::vector<AutofillQueryResponseContents::Field::FieldPrediction> std::vector<AutofillQueryResponseContents::Field::FieldPrediction>
server_predictions; server_predictions;
......
...@@ -191,6 +191,10 @@ const base::Feature kAutofillUseImprovedLabelDisambiguation{ ...@@ -191,6 +191,10 @@ const base::Feature kAutofillUseImprovedLabelDisambiguation{
"AutofillUseImprovedLabelDisambiguation", "AutofillUseImprovedLabelDisambiguation",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
// Server predictions for CVC fields are used if the feature is enabled.
const base::Feature kAutofillUseServerCVCPrediction{
"AutofillUseServerCVCPrediction", base::FEATURE_ENABLED_BY_DEFAULT};
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
// Controls whether the Autofill manual fallback for Addresses and Payments is // Controls whether the Autofill manual fallback for Addresses and Payments is
// present on Android. // present on Android.
......
...@@ -57,7 +57,7 @@ extern const base::Feature kAutofillTouchToFill; ...@@ -57,7 +57,7 @@ extern const base::Feature kAutofillTouchToFill;
extern const base::Feature kAutofillUploadThrottling; extern const base::Feature kAutofillUploadThrottling;
extern const base::Feature kAutofillUseApi; extern const base::Feature kAutofillUseApi;
extern const base::Feature kAutofillUseImprovedLabelDisambiguation; extern const base::Feature kAutofillUseImprovedLabelDisambiguation;
extern const base::Feature kAutofillUseServerCVCPrediction;
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
extern const base::Feature kAutofillManualFallbackAndroid; extern const base::Feature kAutofillManualFallbackAndroid;
extern const base::Feature kAutofillRefreshStyleAndroid; extern const base::Feature kAutofillRefreshStyleAndroid;
......
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