Bug 1552280 - Update default 68+ about:welcome experience including cards for return-to-AMO. r=k88hudson, a=jcristau
authorEd Lee <edilee@mozilla.com>
Wed, 19 Jun 2019 01:02:14 +0000
changeset 537033 492b330e047c1d1e502a9267e27068c15c3cbbef
parent 537032 c5a64922e1a1ed68fb97489e86bda6f48b695288
child 537034 8165ade66edf77295dd97e5e2f7a69532bab2bcf
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersk88hudson, jcristau
bugs1552280
milestone68.0
Bug 1552280 - Update default 68+ about:welcome experience including cards for return-to-AMO. r=k88hudson, a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D35287
browser/app/profile/firefox.js
browser/components/newtab/lib/ASRouter.jsm
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1325,21 +1325,17 @@ pref("browser.newtabpage.activity-stream
 
 // The pref controls if search hand-off is enabled for Activity Stream.
 #ifdef NIGHTLY_BUILD
 pref("browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar", true);
 #else
 pref("browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar", false);
 #endif
 
-#ifdef NIGHTLY_BUILD
 pref("trailhead.firstrun.branches", "join-privacy");
-#else
-pref("trailhead.firstrun.branches", "control");
-#endif
 
 // Enable the DOM fullscreen API.
 pref("full-screen-api.enabled", true);
 
 // Startup Crash Tracking
 // number of startup crashes that can occur before starting into safe mode automatically
 // (this pref has no effect if more than 6 hours have passed since the last crash)
 pref("toolkit.startup.max_resumed_crashes", 3);
--- a/browser/components/newtab/lib/ASRouter.jsm
+++ b/browser/components/newtab/lib/ASRouter.jsm
@@ -719,26 +719,31 @@ class _ASRouter {
    *                             based on clientID and locale.
    * @returns {{experiment: string, interrupt: string, triplet: string}}
    */
   async _generateTrailheadBranches() {
     let experiment = "";
     let interrupt;
     let triplet;
 
+    // Use control Trailhead Branch (for cards) if we are showing RTAMO.
+    if (await this._hasAddonAttributionData()) {
+      return {experiment, interrupt: "control", triplet: ""};
+    }
+
     // If a value is set in TRAILHEAD_OVERRIDE_PREF, it will be returned and no experiment will be set.
     const overrideValue = Services.prefs.getStringPref(TRAILHEAD_CONFIG.OVERRIDE_PREF, "");
     if (overrideValue) {
       [interrupt, triplet] = overrideValue.split("-");
       return {experiment, interrupt, triplet: triplet || ""};
     }
 
     const locale = Services.locale.appLocaleAsLangTag;
 
-    if (TRAILHEAD_CONFIG.LOCALES.includes(locale) && !(await this._hasAddonAttributionData())) {
+    if (TRAILHEAD_CONFIG.LOCALES.includes(locale)) {
       const {userId} = ClientEnvironment;
       experiment = await chooseBranch(`${userId}-trailhead-experiments`, TRAILHEAD_CONFIG.EXPERIMENT_RATIOS);
 
       // For the interrupts experiment,
       // we randomly assign an interrupt and always use the "supercharge" triplet.
       if (experiment === "interrupts") {
         interrupt =  await chooseBranch(`${userId}-interrupts-branch`, TRAILHEAD_CONFIG.BRANCHES.interrupts);
         if (["join", "sync", "cards"].includes(interrupt)) {