mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1917838 - Remove expired telemetry event webrtc.ui.share_display, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D221649
This commit is contained in:
parent
f3e2504e3f
commit
92740b8bc3
@ -100,8 +100,6 @@ export var webrtcUI = {
|
||||
"privacy.webrtc.showIndicatorsOnMacos14AndAbove",
|
||||
true
|
||||
);
|
||||
|
||||
Services.telemetry.setEventRecordingEnabled("webrtc.ui", true);
|
||||
}
|
||||
},
|
||||
|
||||
@ -134,15 +132,6 @@ export var webrtcUI = {
|
||||
allowTabSwitchesForSession: false,
|
||||
tabSwitchCountForSession: 0,
|
||||
|
||||
// True if a window or screen is being shared.
|
||||
sharingDisplay: false,
|
||||
|
||||
// The session ID is used to try to differentiate between instances
|
||||
// where the user is sharing their display somehow. If the user
|
||||
// transitions from a state of not sharing their display, to sharing a
|
||||
// display, we bump the ID.
|
||||
sharingDisplaySessionId: 0,
|
||||
|
||||
// Map of browser elements to indicator data.
|
||||
perTabIndicators: new Map(),
|
||||
activePerms: new Map(),
|
||||
@ -410,14 +399,11 @@ export var webrtcUI = {
|
||||
};
|
||||
}
|
||||
|
||||
let wasSharingDisplay = this.sharingDisplay;
|
||||
|
||||
// Reset our internal notion of whether or not we're sharing
|
||||
// a screen or browser window. Now we'll go through the shared
|
||||
// devices and re-determine what's being shared.
|
||||
let sharingBrowserWindow = false;
|
||||
let sharedWindowRawDeviceIds = new Set();
|
||||
this.sharingDisplay = false;
|
||||
this.sharingScreen = false;
|
||||
let suppressNotifications = false;
|
||||
|
||||
@ -429,16 +415,11 @@ export var webrtcUI = {
|
||||
suppressNotifications |= state.suppressNotifications;
|
||||
|
||||
for (let device of state.devices) {
|
||||
let mediaSource = device.mediaSource;
|
||||
|
||||
if (mediaSource == "window" || mediaSource == "screen") {
|
||||
this.sharingDisplay = true;
|
||||
}
|
||||
|
||||
if (!device.scary) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let mediaSource = device.mediaSource;
|
||||
if (mediaSource == "window") {
|
||||
sharedWindowRawDeviceIds.add(device.rawId);
|
||||
} else if (mediaSource == "screen") {
|
||||
@ -487,42 +468,6 @@ export var webrtcUI = {
|
||||
}
|
||||
}
|
||||
|
||||
// If we weren't sharing a window or screen, and now are, bump
|
||||
// the sharingDisplaySessionId. We use this ID for Event
|
||||
// telemetry, and consider a transition from no shared displays
|
||||
// to some shared displays as a new session.
|
||||
if (!wasSharingDisplay && this.sharingDisplay) {
|
||||
this.sharingDisplaySessionId++;
|
||||
}
|
||||
|
||||
// If we were adding a new display stream, record some Telemetry for
|
||||
// it with the most recent sharedDisplaySessionId. We do this separately
|
||||
// from the loops above because those take into account the pre-existing
|
||||
// streams that might already have been shared.
|
||||
if (aData.devices) {
|
||||
// The mixture of camelCase with under_score notation here is due to
|
||||
// an unfortunate collision of conventions between this file and
|
||||
// Event Telemetry.
|
||||
let silence_notifs = suppressNotifications ? "true" : "false";
|
||||
for (let device of aData.devices) {
|
||||
if (device.mediaSource == "screen") {
|
||||
this.recordEvent("share_display", "screen", {
|
||||
silence_notifs,
|
||||
});
|
||||
} else if (device.mediaSource == "window") {
|
||||
if (device.scary) {
|
||||
this.recordEvent("share_display", "browser_window", {
|
||||
silence_notifs,
|
||||
});
|
||||
} else {
|
||||
this.recordEvent("share_display", "window", {
|
||||
silence_notifs,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Since we're not sharing a screen or browser window,
|
||||
// we can clear these state variables, which are used
|
||||
// to warn users on tab switching when sharing. These
|
||||
@ -964,16 +909,6 @@ export var webrtcUI = {
|
||||
this.allowTabSwitchesForSession = allowForSession;
|
||||
},
|
||||
|
||||
recordEvent(type, object, args = {}) {
|
||||
Services.telemetry.recordEvent(
|
||||
"webrtc.ui",
|
||||
type,
|
||||
object,
|
||||
this.sharingDisplaySessionId.toString(),
|
||||
args
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the sharedData structure to reflect shared screen and window
|
||||
* state. This sets the following key: data pairs on sharedData.
|
||||
|
@ -3370,31 +3370,6 @@ slow_script_warning:
|
||||
uri_type: The kind of script URL that hung.
|
||||
uptime: How long the notification was up (ms).
|
||||
|
||||
webrtc.ui:
|
||||
share_display:
|
||||
objects:
|
||||
- screen
|
||||
- window
|
||||
- browser_window
|
||||
description: >
|
||||
Recorded when a display is shared. The value for this event is a unique
|
||||
ID that differentiates different sharing sessions. A new sharing session
|
||||
is created when the user transitions from not sharing a display to
|
||||
sharing at least one display.
|
||||
extra_keys:
|
||||
silence_notifs: True if the user opted in to silencing DOM notifications.
|
||||
notification_emails:
|
||||
- mconley@mozilla.com
|
||||
- vchin@mozilla.com
|
||||
products:
|
||||
- "firefox"
|
||||
record_in_processes:
|
||||
- main
|
||||
bug_numbers:
|
||||
- 1639283
|
||||
expiry_version: "88"
|
||||
release_channel_collection: opt-out
|
||||
|
||||
ysod:
|
||||
shown:
|
||||
bug_numbers:
|
||||
|
Loading…
Reference in New Issue
Block a user