Commit 678eb60a authored by Clemens Arbesser's avatar Clemens Arbesser Committed by Commit Bot

[Autofill Assistant] Fix LiteScriptStarted UKM metric.

This was erroneously reported on every start of autofill_assistant, not
just lite-script starts.

Bug: b/170952445
Change-Id: I952c7f7aafce879ad7fd8ef7c268b42c5b4fd101
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2475916Reviewed-by: default avatarSandro Maggi <sandromaggi@google.com>
Reviewed-by: default avatarMarian Fechete <marianfe@google.com>
Commit-Queue: Clemens Arbesser <arbesser@google.com>
Cr-Commit-Position: refs/heads/master@{#817524}
parent f9489d9a
...@@ -18,6 +18,7 @@ import org.chromium.base.Callback; ...@@ -18,6 +18,7 @@ import org.chromium.base.Callback;
import org.chromium.base.annotations.UsedByReflection; import org.chromium.base.annotations.UsedByReflection;
import org.chromium.chrome.browser.ActivityTabProvider; import org.chromium.chrome.browser.ActivityTabProvider;
import org.chromium.chrome.browser.autofill_assistant.metrics.LiteScriptOnboarding; import org.chromium.chrome.browser.autofill_assistant.metrics.LiteScriptOnboarding;
import org.chromium.chrome.browser.autofill_assistant.metrics.LiteScriptStarted;
import org.chromium.chrome.browser.autofill_assistant.metrics.OnBoarding; import org.chromium.chrome.browser.autofill_assistant.metrics.OnBoarding;
import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
import org.chromium.chrome.browser.compositor.CompositorViewHolder; import org.chromium.chrome.browser.compositor.CompositorViewHolder;
...@@ -50,6 +51,9 @@ public class AutofillAssistantModuleEntryImpl implements AutofillAssistantModule ...@@ -50,6 +51,9 @@ public class AutofillAssistantModuleEntryImpl implements AutofillAssistantModule
AutofillAssistantPreferencesUtil.isAutofillAssistantFirstTimeLiteScriptUser(); AutofillAssistantPreferencesUtil.isAutofillAssistantFirstTimeLiteScriptUser();
String firstTimeUserScriptPath = parameters.get(PARAMETER_TRIGGER_FIRST_TIME_USER); String firstTimeUserScriptPath = parameters.get(PARAMETER_TRIGGER_FIRST_TIME_USER);
String returningUserScriptPath = parameters.get(PARAMETER_TRIGGER_RETURNING_TIME_USER); String returningUserScriptPath = parameters.get(PARAMETER_TRIGGER_RETURNING_TIME_USER);
AutofillAssistantMetrics.recordLiteScriptStarted(webContents,
isFirstTimeUser ? LiteScriptStarted.LITE_SCRIPT_FIRST_TIME_USER
: LiteScriptStarted.LITE_SCRIPT_RETURNING_USER);
startAutofillAssistantLite(bottomSheetController, browserControls, compositorViewHolder, startAutofillAssistantLite(bottomSheetController, browserControls, compositorViewHolder,
webContents, firstTimeUserScriptPath, returningUserScriptPath, result -> { webContents, firstTimeUserScriptPath, returningUserScriptPath, result -> {
if (result) { if (result) {
......
...@@ -133,10 +133,6 @@ public class AutofillAssistantFacade { ...@@ -133,10 +133,6 @@ public class AutofillAssistantFacade {
} }
} }
AutofillAssistantMetrics.recordLiteScriptStarted(tab.getWebContents(),
AutofillAssistantPreferencesUtil.isAutofillAssistantFirstTimeLiteScriptUser()
? LiteScriptStarted.LITE_SCRIPT_FIRST_TIME_USER
: LiteScriptStarted.LITE_SCRIPT_RETURNING_USER);
AutofillAssistantModuleEntryProvider.INSTANCE.getModuleEntry( AutofillAssistantModuleEntryProvider.INSTANCE.getModuleEntry(
tab, (moduleEntry) -> { tab, (moduleEntry) -> {
if (moduleEntry == null || activity.isActivityFinishingOrDestroyed()) { if (moduleEntry == null || activity.isActivityFinishingOrDestroyed()) {
......
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