Bug 1627869 - get rid of PWMGR_MANAGE_* telemetry histogram code from Thunderbird since toolkit will remove those probes. r=benc DONTBUILD
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Wed, 08 Apr 2020 13:50:38 +0300
changeset 38747 6d53255df005ef1a1f849b7b328b19155956d42e
parent 38746 c796cd15c6a8642f38ba6a6b5312f73b5dd98814
child 38748 6d4c1e45518002fd062d717ccaa226fa9350d34c
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
reviewersbenc
bugs1627869
Bug 1627869 - get rid of PWMGR_MANAGE_* telemetry histogram code from Thunderbird since toolkit will remove those probes. r=benc DONTBUILD
mail/components/preferences/passwordManager.js
--- a/mail/components/preferences/passwordManager.js
+++ b/mail/components/preferences/passwordManager.js
@@ -111,19 +111,16 @@ function Startup() {
       let { target, button } = event;
       let sortField = target.getAttribute("data-field-name");
 
       if (target.nodeName != "treecol" || button != 0 || !sortField) {
         return;
       }
 
       SignonColumnSort(sortField);
-      Services.telemetry
-        .getKeyedHistogramById("PWMGR_MANAGE_SORTED")
-        .add(sortField);
     });
 
   LoadSignons();
 
   // filter the table if requested by caller
   if (
     window.arguments &&
     window.arguments[0] &&
@@ -460,46 +457,32 @@ async function DeleteAllSignons() {
 
   signonsTree.rowCountChanged(0, -deletedSignons.length);
   signonsTree.invalidate();
 
   // disable buttons
   removeButton.setAttribute("disabled", "true");
   removeAllButton.setAttribute("disabled", "true");
   FinalizeSignonDeletions(syncNeeded);
-  Services.telemetry.getHistogramById("PWMGR_MANAGE_DELETED_ALL").add(1);
-  Services.obs.notifyObservers(
-    null,
-    "weave:telemetry:histogram",
-    "PWMGR_MANAGE_DELETED_ALL"
-  );
 }
 
 async function TogglePasswordVisible() {
   if (showingPasswords || (await masterPasswordLogin(AskUserShowPasswords))) {
     showingPasswords = !showingPasswords;
     document.l10n.setAttributes(
       togglePasswordsButton,
       showingPasswords ? "hide-passwords" : "show-passwords"
     );
     document.getElementById("passwordCol").hidden = !showingPasswords;
     FilterPasswords();
   }
 
   // Notify observers that the password visibility toggling is
   // completed.  (Mostly useful for tests)
   Services.obs.notifyObservers(null, "passwordmgr-password-toggle-complete");
-  Services.telemetry
-    .getHistogramById("PWMGR_MANAGE_VISIBILITY_TOGGLED")
-    .add(showingPasswords);
-  Services.obs.notifyObservers(
-    null,
-    "weave:telemetry:histogram",
-    "PWMGR_MANAGE_VISIBILITY_TOGGLED"
-  );
 }
 
 async function AskUserShowPasswords() {
   let dummy = { value: false };
 
   // Confirm the user wants to display passwords
   return (
     Services.prompt.confirmEx(
@@ -514,22 +497,16 @@ async function AskUserShowPasswords() {
       dummy
     ) == 0
   ); // 0=="Yes" button
 }
 
 function FinalizeSignonDeletions(syncNeeded) {
   for (let s = 0; s < deletedSignons.length; s++) {
     Services.logins.removeLogin(deletedSignons[s]);
-    Services.telemetry.getHistogramById("PWMGR_MANAGE_DELETED").add(1);
-    Services.obs.notifyObservers(
-      null,
-      "weave:telemetry:histogram",
-      "PWMGR_MANAGE_DELETED"
-    );
   }
   // If the deletion has been performed in a filtered view, reflect the deletion in the unfiltered table.
   // See bug 405389.
   if (syncNeeded) {
     try {
       signons = Services.logins.getAllLogins();
     } catch (e) {
       signons = [];
@@ -726,38 +703,26 @@ async function CopyPassword() {
   }
   // Copy selected signon's password to clipboard
   let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(
     Ci.nsIClipboardHelper
   );
   let row = signonsTree.currentIndex;
   let password = signonsTreeView.getCellText(row, { id: "passwordCol" });
   clipboard.copyString(password);
-  Services.telemetry.getHistogramById("PWMGR_MANAGE_COPIED_PASSWORD").add(1);
-  Services.obs.notifyObservers(
-    null,
-    "weave:telemetry:histogram",
-    "PWMGR_MANAGE_COPIED_PASSWORD"
-  );
 }
 
 function CopyUsername() {
   // Copy selected signon's username to clipboard
   let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(
     Ci.nsIClipboardHelper
   );
   let row = signonsTree.currentIndex;
   let username = signonsTreeView.getCellText(row, { id: "userCol" });
   clipboard.copyString(username);
-  Services.telemetry.getHistogramById("PWMGR_MANAGE_COPIED_USERNAME").add(1);
-  Services.obs.notifyObservers(
-    null,
-    "weave:telemetry:histogram",
-    "PWMGR_MANAGE_COPIED_USERNAME"
-  );
 }
 
 function EditCellInSelectedRow(columnName) {
   let row = signonsTree.currentIndex;
   let columnElement = getColumnByName(columnName);
   signonsTree.startEditing(
     row,
     signonsTree.columns.getColumnFor(columnElement)