Commit 6b41453d authored by Ioana Pandele's avatar Ioana Pandele Committed by Commit Bot

Measure how many times a generated password is deleted by autofilling

Bug: 880076
Change-Id: Ibd0f57fd3b0199c897a8b28bbf7f7a85f79693ac
Reviewed-on: https://chromium-review.googlesource.com/1195503
Commit-Queue: Ioana Pandele <ioanap@chromium.org>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588409}
parent b9f3bad5
......@@ -285,8 +285,11 @@ void PasswordGenerationAgent::OnDynamicFormsSeen() {
void PasswordGenerationAgent::OnFieldAutofilled(
const WebInputElement& password_element) {
if (password_is_generated_ && generation_element_ == password_element)
if (password_is_generated_ && generation_element_ == password_element) {
password_generation::LogPasswordGenerationEvent(
password_generation::PASSWORD_DELETED_BY_AUTOFILLING);
PasswordNoLongerGenerated();
}
}
void PasswordGenerationAgent::FindPossibleGenerationForm() {
......
......@@ -71,6 +71,10 @@ enum PasswordGenerationEvent {
// Context menu with generation item was shown.
PASSWORD_GENERATION_CONTEXT_MENU_SHOWN,
// The generated password was removed from the field because a credential
// was autofilled.
PASSWORD_DELETED_BY_AUTOFILLING,
// Number of enum entries, used for UMA histogram reporting macros.
EVENT_ENUM_COUNT
};
......
......@@ -37194,6 +37194,7 @@ Called by update_net_trust_anchors.py.-->
<int value="12" label="Generation triggered by autocomplete attributes"/>
<int value="13" label="Generation item in the context menu accepted"/>
<int value="14" label="Generation item in the context menu shown"/>
<int value="15" label="Generated password deleted by autofilling"/>
</enum>
<enum name="PasswordGenerationUserEvent">
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