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

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

This reverts commit d0364f52.

Reason for revert: Branch point is over. Button titles should be re-enabled.

Original change's description:
> [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: Vadym Doroshenko <dvadym@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#625600}

TBR=dvadym@chromium.org,kolos@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

TBR=dvadym@chromium.org

Bug: 910546
Change-Id: I16766fbd93ce627b5385965ce334f78c59a04631
Reviewed-on: https://chromium-review.googlesource.com/c/1437614
Commit-Queue: Maxim Kolosovskiy <kolos@chromium.org>
Reviewed-by: default avatarMaxim Kolosovskiy <kolos@chromium.org>
Auto-Submit: Maxim Kolosovskiy <kolos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626251}
parent 35d74390
......@@ -1415,6 +1415,11 @@ 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 {
......@@ -1791,6 +1796,11 @@ 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