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
Родитель 835cfa04a2
Коммит f6523cc628
2 изменённых файлов: 7 добавлений и 0 удалений

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

@ -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"]);

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

@ -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) {