summaryrefslogtreecommitdiffstats
path: root/browser/components/asrouter/modules/ASRouter.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/asrouter/modules/ASRouter.sys.mjs')
-rw-r--r--browser/components/asrouter/modules/ASRouter.sys.mjs22
1 files changed, 9 insertions, 13 deletions
diff --git a/browser/components/asrouter/modules/ASRouter.sys.mjs b/browser/components/asrouter/modules/ASRouter.sys.mjs
index f6657a39b9..e46c57f685 100644
--- a/browser/components/asrouter/modules/ASRouter.sys.mjs
+++ b/browser/components/asrouter/modules/ASRouter.sys.mjs
@@ -106,18 +106,10 @@ const TOPIC_EXPERIMENT_ENROLLMENT_CHANGED = "nimbus:enrollments-updated";
const USE_REMOTE_L10N_PREF =
"browser.newtabpage.activity-stream.asrouter.useRemoteL10n";
-// Experiment groups that need to report the reach event in Messaging-Experiments.
-// If you're adding new groups to it, make sure they're also added in the
-// `messaging_experiments.reach.objects` defined in "toolkit/components/telemetry/Events.yaml"
-const REACH_EVENT_GROUPS = [
- "cfr",
- "moments-page",
- "infobar",
- "spotlight",
- "featureCallout",
-];
const REACH_EVENT_CATEGORY = "messaging_experiments";
const REACH_EVENT_METHOD = "reach";
+// Reach for the pbNewtab feature will be added in bug 1755401
+const NO_REACH_EVENT_GROUPS = ["pbNewtab"];
export const MessageLoaderUtils = {
STARTPAGE_VERSION,
@@ -405,7 +397,11 @@ export const MessageLoaderUtils = {
// Add Reach messages from unenrolled sibling branches, provided we are
// recording Reach events for this feature. If we are in a rollout, we do
// not have sibling branches.
- if (!REACH_EVENT_GROUPS.includes(featureId) || !experimentData) {
+ if (
+ NO_REACH_EVENT_GROUPS.includes(featureId) ||
+ !MESSAGING_EXPERIMENTS_DEFAULT_FEATURES.includes(featureId) ||
+ !experimentData
+ ) {
continue;
}
@@ -947,7 +943,7 @@ export class _ASRouter {
return this.state;
}
- async _onLocaleChanged(subject, topic, data) {
+ async _onLocaleChanged() {
await this._maybeUpdateL10nAttachment();
}
@@ -1743,7 +1739,7 @@ export class _ASRouter {
}
// Update storage
this._storage.set("groupImpressions", newGroupImpressions);
- return this.setState(({ groups }) => ({
+ return this.setState(() => ({
groupImpressions: newGroupImpressions,
}));
}