Bug 1176391 - Remove privatebrowser-button and context menu click counts from BrowserUITelemetry.jsm. r=Gijs

This commit is contained in:
Mike Conley 2015-06-19 17:47:45 -04:00
parent a001598bef
commit 9f943a4366

View File

@ -441,6 +441,12 @@ this.BrowserUITelemetry = {
_checkForBuiltinItem: function(aEvent) {
let item = aEvent.originalTarget;
// We don't want to count clicks on the private browsing
// button for privacy reasons. See bug 1176391.
if (item.id == "privatebrowsing-button") {
return;
}
// We special-case the bookmarks-menu-button, since we want to
// monitor more than just clicks on it.
if (item.id == "bookmarks-menu-button" ||
@ -651,7 +657,9 @@ this.BrowserUITelemetry = {
"navigation", "back", "forward", "reload", "stop", "bookmarkpage",
"spell-no-suggestions", "spell-add-to-dictionary",
"spell-undo-add-to-dictionary", "openlinkincurrent", "openlinkintab",
"openlink", "openlinkprivate", "bookmarklink", "sharelink", "savelink",
"openlink",
// "openlinkprivate" intentionally omitted for privacy reasons. See bug 1176391.
"bookmarklink", "sharelink", "savelink",
"marklinkMenu", "copyemail", "copylink", "media-play", "media-pause",
"media-mute", "media-unmute", "media-playbackrate",
"media-playbackrate-050x", "media-playbackrate-100x",
@ -679,6 +687,13 @@ this.BrowserUITelemetry = {
registerContextMenuInteraction: function(keys, itemID) {
if (itemID) {
if (itemID == "openlinkprivate") {
// Don't record anything, not even an other-item count
// if the user chose to open in a private window. See
// bug 1176391.
return;
}
if (!this._contextMenuItemWhitelist.has(itemID)) {
itemID = "other-item";
}