From 7bcb0df079c075277c2af0f92f55f61eb2ef7107 Mon Sep 17 00:00:00 2001 From: Felipe Gomes Date: Thu, 3 Mar 2016 11:35:11 -0300 Subject: [PATCH] Bug 1249845 - Store the e10s rollout cohort in the telemetry environment. r=gfritzsche --- toolkit/components/telemetry/TelemetryEnvironment.jsm | 2 ++ toolkit/components/telemetry/docs/environment.rst | 1 + .../telemetry/tests/unit/test_TelemetryEnvironment.js | 1 + 3 files changed, 4 insertions(+) diff --git a/toolkit/components/telemetry/TelemetryEnvironment.jsm b/toolkit/components/telemetry/TelemetryEnvironment.jsm index f6d154e4765c..7e22d0c3ad62 100644 --- a/toolkit/components/telemetry/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm @@ -176,6 +176,7 @@ const PREF_PARTNER_ID = "mozilla.partner.id"; const PREF_UPDATE_ENABLED = "app.update.enabled"; const PREF_UPDATE_AUTODOWNLOAD = "app.update.auto"; const PREF_SEARCH_COHORT = "browser.search.cohort"; +const PREF_E10S_COHORT = "e10s.rollout.cohort"; const EXPERIMENTS_CHANGED_TOPIC = "experiments-changed"; const SEARCH_ENGINE_MODIFIED_TOPIC = "browser-search-engine-modified"; @@ -1110,6 +1111,7 @@ EnvironmentCache.prototype = { this._currentEnvironment.settings = { blocklistEnabled: Preferences.get(PREF_BLOCKLIST_ENABLED, true), e10sEnabled: Services.appinfo.browserTabsRemoteAutostart, + e10sCohort: Preferences.get(PREF_E10S_COHORT, "unknown"), telemetryEnabled: Utils.isTelemetryEnabled, locale: getBrowserLocale(), update: { diff --git a/toolkit/components/telemetry/docs/environment.rst b/toolkit/components/telemetry/docs/environment.rst index 7b87e8eb95fb..12a274fd35d7 100644 --- a/toolkit/components/telemetry/docs/environment.rst +++ b/toolkit/components/telemetry/docs/environment.rst @@ -43,6 +43,7 @@ Structure:: }, searchCohort: , // optional, contains an identifier for any active search A/B experiments e10sEnabled: , // whether e10s is on, i.e. browser tabs open by default in a different process + e10sCohort: , // which e10s cohort was assigned for this user telemetryEnabled: , // false on failure locale: , // e.g. "it", null on failure update: { diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js index 84ec2e6dcb02..60e030eaa0d6 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js @@ -341,6 +341,7 @@ function checkSettingsSection(data) { const EXPECTED_FIELDS_TYPES = { blocklistEnabled: "boolean", e10sEnabled: "boolean", + e10sCohort: "string", telemetryEnabled: "boolean", locale: "string", update: "object",