diff --git a/addon/outofdate-notifications@mozilla.org/bootstrap.js b/addon/outofdate-notifications@mozilla.org/bootstrap.js index ea7ec6d..ed627a0 100644 --- a/addon/outofdate-notifications@mozilla.org/bootstrap.js +++ b/addon/outofdate-notifications@mozilla.org/bootstrap.js @@ -29,13 +29,18 @@ const KNOWN_DISTROS = ["1und1", "yandex", "yahoo"]; -let gPingPayload = { shown: false, clicked: false }; +let gPingTypes = [{ payload: { event: "started" }, sent: false }, + { payload: { event: "shown" }, sent: false }, + { payload: { event: "clicked" }, sent: false }]; let gIsPartnerRepack = false; -function sendPing() { - TelemetryController.submitExternalPing( - "outofdate-notifications-system-addon", gPingPayload, - { addClientId: true }); +function sendPing(aPingIndex) { + if (!gPingTypes[aPingIndex].sent) { + TelemetryController.submitExternalPing( + "outofdate-notifications-system-addon", gPingTypes[aPingIndex].payload, + { addClientId: true }); + gPingTypes[aPingIndex].sent = true; + } } function startup() { @@ -60,7 +65,7 @@ function startup() { // Load into any new windows wm.addListener(windowListener); - sendPing(); + sendPing(0); } function showDoorhanger(aWindow) { @@ -73,8 +78,7 @@ function showDoorhanger(aWindow) { label: gStringBundle.GetStringFromName("buttonlabel"), accessKey: gStringBundle.GetStringFromName("buttonaccesskey"), callback: function () { - gPingPayload.clicked = true; - sendPing(); + sendPing(2); let url = Preferences.get(PREF_UPDATE_URL, PREF_UPDATE_DEFAULT_URL); aWindow.openUILinkIn(url, "tab"); @@ -93,8 +97,7 @@ function showDoorhanger(aWindow) { notification, "class", "messageCloseButton close-icon tabbable"); closeButton.hidden = true; - gPingPayload.shown = true; - sendPing(); + sendPing(1); } function loadIntoWindow(aWindow) { diff --git a/addon/outofdate-notifications@mozilla.org/chrome.manifest b/addon/outofdate-notifications@mozilla.org/chrome.manifest index 5d3a7d9..0bd0134 100644 --- a/addon/outofdate-notifications@mozilla.org/chrome.manifest +++ b/addon/outofdate-notifications@mozilla.org/chrome.manifest @@ -1 +1,49 @@ locale outofdate-notifications en-US locales/en-US/ +locale outofdate-notifications ar locales/ar/ +locale outofdate-notifications ast locales/ast/ +locale outofdate-notifications az locales/az/ +locale outofdate-notifications bg locales/bg/ +locale outofdate-notifications bn-BD locales/bn-BD/ +locale outofdate-notifications cs locales/cs/ +locale outofdate-notifications cy locales/cy/ +locale outofdate-notifications da locales/da/ +locale outofdate-notifications de locales/de/ +locale outofdate-notifications dsb locales/dsb/ +locale outofdate-notifications el locales/el/ +locale outofdate-notifications en-GB locales/en-GB/ +locale outofdate-notifications es-AR locales/es-AR/ +locale outofdate-notifications es-CL locales/es-CL/ +locale outofdate-notifications es-ES locales/es-ES/ +locale outofdate-notifications es-MX locales/es-MX/ +locale outofdate-notifications et locales/et/ +locale outofdate-notifications fi locales/fi/ +locale outofdate-notifications fr locales/fr/ +locale outofdate-notifications fy-NL locales/fy-NL/ +locale outofdate-notifications he locales/he/ +locale outofdate-notifications hr locales/hr/ +locale outofdate-notifications hsb locales/hsb/ +locale outofdate-notifications hu locales/hu/ +locale outofdate-notifications id locales/id/ +locale outofdate-notifications it locales/it/ +locale outofdate-notifications ja locales/ja/ +locale outofdate-notifications kk locales/kk/ +locale outofdate-notifications ko locales/ko/ +locale outofdate-notifications lv locales/lv/ +locale outofdate-notifications nl locales/nl/ +locale outofdate-notifications nn-NO locales/nn-NO/ +locale outofdate-notifications pa-IN locales/pa-IN/ +locale outofdate-notifications pl locales/pl/ +locale outofdate-notifications pt-BR locales/pt-BR/ +locale outofdate-notifications pt-PT locales/pt-PT/ +locale outofdate-notifications ru locales/ru/ +locale outofdate-notifications sk locales/sk/ +locale outofdate-notifications sl locales/sl/ +locale outofdate-notifications sq locales/sq/ +locale outofdate-notifications sr locales/sr/ +locale outofdate-notifications sv-SE locales/sv-SE/ +locale outofdate-notifications te locales/te/ +locale outofdate-notifications tr locales/tr/ +locale outofdate-notifications uk locales/uk/ +locale outofdate-notifications uz locales/uz/ +locale outofdate-notifications zh-CN locales/zh-CN/ +locale outofdate-notifications zh-TW locales/zh-TW/ diff --git a/addon/outofdate-notifications@mozilla.org/install.rdf b/addon/outofdate-notifications@mozilla.org/install.rdf index 39df57d..aa6d7d8 100644 --- a/addon/outofdate-notifications@mozilla.org/install.rdf +++ b/addon/outofdate-notifications@mozilla.org/install.rdf @@ -9,7 +9,7 @@ outofdate-notifications@mozilla.org - 1.2 + 1.3 2 true