Bug 1359495 - Expose webextension status in the multi cohorts. r=Felipe
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 25 Apr 2017 13:59:16 -0700
changeset 354825 d83907ea33abff72b189ad08d055494b6e7866e1
parent 354824 271acc9d32e5673145fc54a66d65c0bd4dbf64e6
child 354826 35e9b30a0497a664da2f8eb5bb4cebf0780b5cb4
push id41477
push usermrbkap@mozilla.com
push dateTue, 25 Apr 2017 21:44:38 +0000
treeherderautoland@35e9b30a0497 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe
bugs1359495
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1359495 - Expose webextension status in the multi cohorts. r=Felipe
browser/extensions/e10srollout/bootstrap.js
--- a/browser/extensions/e10srollout/bootstrap.js
+++ b/browser/extensions/e10srollout/bootstrap.js
@@ -170,29 +170,36 @@ function defineCohort() {
       !inMultiExperiment ||
       userOptedIn.multi ||
       disqualified ||
       getAddonsDisqualifyForMulti()) {
     Preferences.reset(PREF_E10S_PROCESSCOUNT + ".web");
     return;
   }
 
+  // If we got here with a cohortPrefix, it must be "addons-set50allmpc-",
+  // and we know because of getAddonsDisqualifyForMulti that the addons that
+  // are installed must be web extensions.
+  if (cohortPrefix) {
+    cohortPrefix = "webextensions-";
+  }
+
   // The user is in the multi experiment!
   // Decide how many content processes to use for this user.
   let BUCKETS = {
     1: .25,
     2: .5,
     4: .75,
     8: 1
   };
 
   let multiUserSample = getUserSample(true);
   for (let sampleName of Object.getOwnPropertyNames(BUCKETS)) {
     if (multiUserSample < BUCKETS[sampleName]) {
-      setCohort(`multiBucket${sampleName}`);
+      setCohort(`${cohortPrefix}multiBucket${sampleName}`);
       Preferences.set(PREF_E10S_PROCESSCOUNT + ".web", sampleName);
       break;
     }
   }
 }
 
 function shutdown(data, reason) {
 }