Commit d0364f52 authored by Maxim Kolosovskiy's avatar Maxim Kolosovskiy Committed by Commit Bot

[Password Generation] Disable button titles calculation in Beta, Stable

Button titles are not used in Beta, Stable channels at the moment. They will be crowdsourced later (as a part of crbug.com/896719).
Button titles inference is expensive, especially, for <form>less forms. See the metric PasswordManager.ButtonTitlePerformance.NoFormTag. This will be fixed as a part of new parser refactoring.
This CL temporarly disables button titles before branch point.

Bug: 910546
Change-Id: I55ac7d3bcbdc895e165cd3a46288fe089b558967
Reviewed-on: https://chromium-review.googlesource.com/c/1432854
Commit-Queue: Maxim Kolosovskiy <kolos@chromium.org>
Commit-Queue: Vadym Doroshenko <dvadym@chromium.org>
Auto-Submit: Maxim Kolosovskiy <kolos@chromium.org>
Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625600}
parent a702f622
......@@ -1415,11 +1415,6 @@ bool UnownedFormElementsAndFieldSetsToFormData(
FormData* form,
FormFieldData* field) {
form->origin = GetCanonicalOriginForDocument(document);
if (!document.Body().IsNull()) {
SCOPED_UMA_HISTOGRAM_TIMER(
"PasswordManager.ButtonTitlePerformance.NoFormTag");
form->button_titles = InferButtonTitlesForForm(document.Body());
}
if (document.GetFrame() && document.GetFrame()->Top()) {
form->main_frame_origin = document.GetFrame()->Top()->GetSecurityOrigin();
} else {
......@@ -1796,11 +1791,6 @@ bool WebFormElementToFormData(
form->unique_renderer_id = form_element.UniqueRendererFormId();
form->origin = GetCanonicalOriginForDocument(frame->GetDocument());
form->action = GetCanonicalActionForForm(form_element);
{
SCOPED_UMA_HISTOGRAM_TIMER(
"PasswordManager.ButtonTitlePerformance.HasFormTag");
form->button_titles = InferButtonTitlesForForm(form_element);
}
if (frame->Top()) {
form->main_frame_origin = frame->Top()->GetSecurityOrigin();
} else {
......
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