Fix histogram max bucket
The maximum number of fields is 200 Bug: 40100455 Change-Id: Ica529b360fa6ab4ac97e52c5fbd674d40fddeaa3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088786 Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Commit-Queue: Jihad Hanna <jihadghanna@google.com> Reviewed-by: Jan Keitel <jkeitel@google.com> Cr-Commit-Position: refs/heads/main@{#1395829}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
1a85ba26f7
commit
b7c2d50a7d
components/autofill/content/renderer
tools/metrics/histograms/metadata/autofill
@ -2154,10 +2154,10 @@ std::optional<FormData> ExtractFormDataWithFieldsAndFrames(
|
||||
}
|
||||
}
|
||||
|
||||
base::UmaHistogramCounts100(!form_element
|
||||
? "Autofill.ExtractFormUnowned.FieldCount"
|
||||
: "Autofill.ExtractFormOwned.FieldCount",
|
||||
fields.size());
|
||||
base::UmaHistogramCounts1000(!form_element
|
||||
? "Autofill.ExtractFormUnowned.FieldCount2"
|
||||
: "Autofill.ExtractFormOwned.FieldCount2",
|
||||
fields.size());
|
||||
FormData form;
|
||||
if (!form_element) {
|
||||
DCHECK(form.renderer_id().is_null());
|
||||
|
@ -2153,10 +2153,10 @@ TEST_F(FormAutofillUtilsTest, ExtractFormData_OwnedForm) {
|
||||
Property(&FormFieldData::name, u"check_input"),
|
||||
Property(&FormFieldData::name, u"number_input"),
|
||||
Property(&FormFieldData::name, u"select_input")))));
|
||||
histogram_tester.ExpectTotalCount("Autofill.ExtractFormUnowned.FieldCount",
|
||||
histogram_tester.ExpectTotalCount("Autofill.ExtractFormUnowned.FieldCount2",
|
||||
0);
|
||||
histogram_tester.ExpectUniqueSample("Autofill.ExtractFormOwned.FieldCount", 4,
|
||||
1);
|
||||
histogram_tester.ExpectUniqueSample("Autofill.ExtractFormOwned.FieldCount2",
|
||||
4, 1);
|
||||
}
|
||||
|
||||
TEST_F(FormAutofillUtilsTest, ExtractFormData_UnownedForm) {
|
||||
@ -2181,8 +2181,8 @@ TEST_F(FormAutofillUtilsTest, ExtractFormData_UnownedForm) {
|
||||
Property(&FormFieldData::name, u"check_input"),
|
||||
Property(&FormFieldData::name, u"number_input"),
|
||||
Property(&FormFieldData::name, u"select_input")))));
|
||||
histogram_tester.ExpectTotalCount("Autofill.ExtractFormOwned.FieldCount", 0);
|
||||
histogram_tester.ExpectUniqueSample("Autofill.ExtractFormUnowned.FieldCount",
|
||||
histogram_tester.ExpectTotalCount("Autofill.ExtractFormOwned.FieldCount2", 0);
|
||||
histogram_tester.ExpectUniqueSample("Autofill.ExtractFormUnowned.FieldCount2",
|
||||
4, 1);
|
||||
}
|
||||
|
||||
|
@ -2418,8 +2418,8 @@ AutofillSaveCreditCardPromptDestination.
|
||||
</summary>
|
||||
</histogram>
|
||||
|
||||
<histogram name="Autofill.ExtractForm{OwnershipType}.FieldCount" units="fields"
|
||||
expires_after="2025-06-08">
|
||||
<histogram name="Autofill.ExtractForm{OwnershipType}.FieldCount2"
|
||||
units="fields" expires_after="2025-12-12">
|
||||
<owner>jkeitel@google.com</owner>
|
||||
<owner>chrome-autofill-alerts@google.com</owner>
|
||||
<summary>
|
||||
|
Reference in New Issue
Block a user