зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
a58e7ef933
Коммит
529c78906f
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче