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

[Autofill] Add finch guarded retrieval of overall predictions from cache

Change-Id: If3d6d659df9265d1b16989fe6590dbdd61cc3b76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537696
Commit-Queue: Matthias Körber <koerber@google.com>
Reviewed-by: default avatarChristoph Schwering <schwering@google.com>
Cr-Commit-Position: refs/heads/master@{#830625}
parent 99598799
......@@ -1124,6 +1124,14 @@ void FormStructure::RetrieveFromCache(
}
field->set_server_type(cached_field->server_type());
field->set_previously_autofilled(cached_field->previously_autofilled());
// Only retrieve an overall prediction from cache if a server prediction is
// set.
if (base::FeatureList::IsEnabled(
features::kAutofillRetrieveOverallPredictionsFromCache) &&
field->server_type() != NO_SERVER_DATA) {
field->SetTypeTo(cached_field->Type());
}
}
}
......
......@@ -212,6 +212,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
......
......@@ -58,6 +58,7 @@ extern const base::Feature kAutofillProfileClientValidation;
extern const base::Feature kAutofillProfileImportFromUnfocusableFields;
extern const base::Feature kAutofillProfileServerValidation;
extern const base::Feature kAutofillRestrictUnownedFieldsToFormlessCheckout;
extern const base::Feature kAutofillRetrieveOverallPredictionsFromCache;
extern const base::Feature kAutofillRichMetadataQueries;
extern const base::Feature kAutofillSaveAndFillVPA;
extern const base::Feature kAutofillSectionUponRedundantNameInfo;
......
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