Drew Willcoxon 72261a2637 Bug 1801244 - Make Merino opt out on Beta. r=daisuke,nanj,RyanVM,chutten
This makes Merino opt out on Beta. There are two different parts:

1. Decide what "Beta" means. After discussing this with RyanVM, I'm using the
   same definition [used by telemetry](https://searchfox.org/mozilla-central/rev/2f47e3dacf0d773e9c7f363cecf10cfbea490679/toolkit/components/telemetry/app/TelemetryControllerBase.jsm#103,112-114): (a) if `MOZ_UPDATE_CHANNEL` is "beta"
   or (b) if it's "release" and `app.update.channel` is "beta". The latter case
   is true for RC builds delivered to the Beta channel. I moved the relevant
   telemetry logic to `AppConstants` so I can easily use it too. Bug 1435753 has
   context on this logic w/r/t telemetry.
2. Change the Merino default so it's enabled on Beta in the offline scenario. I
   kept the online scenario's disabled default since the only point of
   delivering the online scenario to the user now is to prompt them to opt in to
   Merino. This change is in UrlbarPrefs.sys.mjs.

The rest of the patch updates tests.

The effect of this patch will be to use a new default value of true for the
`quicksuggest.dataCollection.enabled` pref on Beta in the offline scenario. If
the user didn't touch the pref at all, then its previous default value was
false, and the new default will now be true.

If the user enabled the pref, it will remain enabled. If the user enabled and
then disabled it, it will remain disabled. That's because the pref is sticky, so
once it has a value on the user branch, it will keep that value. This patch only
changes the value of the pref on the default branch, so it won't override the
user's previous choice since that is set on the user branch.

Differential Revision: https://phabricator.services.mozilla.com/D162353
2022-11-22 06:19:24 +00:00
..