Bug 1249281 - add UITelemetry for tab audio mute control, r=gijs

MozReview-Commit-ID: 8UTh7C6EXKL
This commit is contained in:
Benjamin Dahse 2016-02-21 03:28:00 +00:00
parent 835cfa04a2
commit f6523cc628
2 changed files with 7 additions and 0 deletions

View File

@ -6243,9 +6243,11 @@
if (browser.audioMuted) {
browser.unmute();
this.removeAttribute("muted");
BrowserUITelemetry.countTabMutingEvent("unmute", aMuteReason);
} else {
browser.mute();
this.setAttribute("muted", "true");
BrowserUITelemetry.countTabMutingEvent("mute", aMuteReason);
}
this.muteReason = aMuteReason || null;
tabContainer.tabbrowser._tabAttrModified(this, ["muted"]);

View File

@ -134,6 +134,7 @@ XPCOMUtils.defineLazyGetter(this, "ALL_BUILTIN_ITEMS", function() {
"BMB_unsortedBookmarksPopup",
"BMB_bookmarksToolbarPopup",
"search-go-button",
"soundplaying-icon",
]
return DEFAULT_ITEMS.concat(PALETTE_ITEMS)
.concat(SPECIAL_CASES);
@ -610,6 +611,10 @@ this.BrowserUITelemetry = {
this._countEvent(["forget-button", timeId]);
},
countTabMutingEvent: function(action, reason) {
this._countEvent(["tab-audio-control", action, reason || "no reason given"]);
},
_logAwesomeBarSearchResult: function (url) {
let spec = Services.search.parseSubmissionURL(url);
if (spec.engine) {