Bug 1715129 - Collect telemetry on how many clients have Proton enabled. r=chutten data-review=chutten

Differential Revision: https://phabricator.services.mozilla.com/D117093
This commit is contained in:
Mike Conley 2021-06-08 16:09:22 +00:00
Родитель a58e7ef933
Коммит 529c78906f
3 изменённых файлов: 39 добавлений и 0 удалений

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

@ -0,0 +1,22 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
$schema: moz://mozilla.org/schemas/glean/metrics/1-0-0
browser.ui:
proton_enabled:
type: boolean
description: >
True if the Proton default theme is enabled.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1715129
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1715129#c3
data_sensitivity:
- technical
notification_emails:
- mconley@mozilla.com
- bwinton@mozilla.com
expires: "92"

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

@ -17,6 +17,8 @@ const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
Cu.importGlobalProperties(["Glean"]);
XPCOMUtils.defineLazyModuleGetters(this, {
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
ActorManagerParent: "resource://gre/modules/ActorManagerParent.jsm",
@ -2535,6 +2537,12 @@ BrowserGlue.prototype = {
},
},
{
task: () => {
this._collectProtonTelemetry();
},
},
// WebDriver components (Remote Agent and Marionette) need to be
// initialized as very last step.
{
@ -4225,6 +4233,14 @@ BrowserGlue.prototype = {
}
},
_collectProtonTelemetry() {
let protonEnabled = Services.prefs.getBoolPref(
"browser.proton.enabled",
true
);
Glean.browserUi.protonEnabled.set(protonEnabled);
},
QueryInterface: ChromeUtils.generateQI([
"nsIObserver",
"nsISupportsWeakReference",

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

@ -10,6 +10,7 @@ metrics_yamls = [
"toolkit/components/glean/metrics.yaml",
"toolkit/components/glean/test_metrics.yaml",
"toolkit/mozapps/update/metrics.yaml",
"browser/base/content/metrics.yaml",
]
# The list of all Glean pings.yaml files, relative to the top src dir.