Bug 1351425 - Only temp. qualify for e10s when enabled at <100%. r=Felipe

This tweaks the temporary qualification step (currently used only for DevTools)
so that it does not apply on channels that are 100% enabled anyway.  This does
not change how many users receive e10s on, it only tweaks who falls into which
cohort, since there's no reason to push all DevTools users to a special cohort
if everyone would have received e10s on anyway.

MozReview-Commit-ID: 5Yn6M50Ny1w
This commit is contained in:
J. Ryan Stinnett 2017-03-28 16:22:23 -05:00
Родитель 83daa70643
Коммит 8739b5c5f7
2 изменённых файлов: 8 добавлений и 3 удалений

9
browser/extensions/e10srollout/bootstrap.js поставляемый
Просмотреть файл

@ -84,7 +84,8 @@ function defineCohort() {
let userOptedOut = optedOut();
let userOptedIn = optedIn();
let disqualified = (Services.appinfo.multiprocessBlockPolicy != 0);
let testGroup = (getUserSample() < TEST_THRESHOLD[updateChannel]);
let testThreshold = TEST_THRESHOLD[updateChannel];
let testGroup = (getUserSample() < testThreshold);
let hasNonExemptAddon = Preferences.get(PREF_E10S_HAS_NONEXEMPT_ADDON, false);
let temporaryDisqualification = getTemporaryDisqualification();
let temporaryQualification = getTemporaryQualification();
@ -111,7 +112,11 @@ function defineCohort() {
// here will be accumulated as "2 - Disabled", which is fine too.
setCohort(`temp-disqualified-${temporaryDisqualification}`);
Preferences.reset(PREF_TOGGLE_E10S);
} else if (!disqualified && temporaryQualification != "") {
} else if (!disqualified && testThreshold < 1.0 &&
temporaryQualification != "") {
// Users who are qualified for e10s and on channels where some population
// would not receive e10s can be pushed into e10s anyway via a temporary
// qualification which overrides the user sample value when non-empty.
setCohort(`temp-qualified-${temporaryQualification}`);
Preferences.set(PREF_TOGGLE_E10S, true);
} else if (testGroup) {

Просмотреть файл

@ -10,7 +10,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>e10srollout@mozilla.org</em:id>
<em:version>1.12</em:version>
<em:version>1.13</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:multiprocessCompatible>true</em:multiprocessCompatible>