Commit 5cf576bf authored by Mathias Carlen's avatar Mathias Carlen Committed by Commit Bot

[AA] Fix a drop out metrics enum collision.

Before this change, failing to install the feature module or failing to
start due to no initial scripts were mapped to the same drop out reason
enum value.

Thich patch changes the enum value and the name for the DFM entry. It is
not due to the DFM being cancelled, it is triggered when a DFM
installation failed alltogether.

R=arbesser@google.com

Bug: b/132424979
Change-Id: Ic235f4b503f059ecb1ee21b5cb1bc213e578df1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1669351Reviewed-by: default avatarClemens Arbesser <arbesser@google.com>
Commit-Queue: Mathias Carlen <mcarlen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670869}
parent 20749d16
......@@ -98,7 +98,7 @@ public class AutofillAssistantFacade {
AutofillAssistantMetrics.recordDropOut(DropOutReason.AA_START);
AutofillAssistantModuleEntryProvider.getModuleEntry(activity, (moduleEntry) -> {
if (moduleEntry == null) {
AutofillAssistantMetrics.recordDropOut(DropOutReason.DFM_CANCELLED);
AutofillAssistantMetrics.recordDropOut(DropOutReason.DFM_INSTALL_FAILED);
return;
}
......
......@@ -43,7 +43,7 @@ class Metrics {
GET_SCRIPTS_FAILED = 17,
GET_SCRIPTS_UNPARSABLE = 18,
NO_INITIAL_SCRIPTS = 19,
DFM_CANCELLED = 19,
DFM_INSTALL_FAILED = 20,
NUM_ENTRIES = 21,
};
......@@ -145,6 +145,12 @@ class Metrics {
case NO_INITIAL_SCRIPTS:
out << "NO_INITIAL_SCRIPTS";
break;
case DFM_INSTALL_FAILED:
out << "DFM_INSTALL_FAILED";
break;
// Intentionally no default case to make compilation fail if a new value
// was added to the enum but not to this list.
}
......
......@@ -3382,6 +3382,7 @@ Unknown properties are collapsed to zero. -->
<int value="17" label="Get scripts failed"/>
<int value="18" label="Get scripts unparsable"/>
<int value="19" label="No initial scripts"/>
<int value="20" label="Installing the feature module failed"/>
</enum>
<enum name="AutofillAssistantOnBoarding">
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