Bug 1458205 - telemetry.js: Remove actionOccurred r=jdescottes
authorMichael Ratcliffe <mratcliffe@mozilla.com>
Fri, 04 May 2018 14:30:40 +0100
changeset 794463 087c017ae742e6d6fc56eb02f79ee7f3c5b09924
parent 794462 eaf43c0e3a71690fd7256b86f85d21909440c896
child 794464 d800f84be5265fcd0deabc351523728f90c4393d
push id109697
push userbmo:sledru@mozilla.com
push dateSat, 12 May 2018 10:04:34 +0000
reviewersjdescottes
bugs1458205
milestone62.0a1
Bug 1458205 - telemetry.js: Remove actionOccurred r=jdescottes MozReview-Commit-ID: 7mBtbV5inso
devtools/client/accessibility/components/Accessible.js
devtools/client/shared/telemetry.js
devtools/client/webide/content/webide.js
devtools/client/webide/modules/project-list.js
--- a/devtools/client/accessibility/components/Accessible.js
+++ b/devtools/client/accessibility/components/Accessible.js
@@ -156,17 +156,17 @@ class Accessible extends Component {
       return;
     }
 
     gToolbox.highlighterUtils.unhighlight();
   }
 
   selectNode(nodeFront, reason = "accessibility") {
     if (gTelemetry) {
-      gTelemetry.actionOccurred("accessibilityNodeInspected");
+      gTelemetry.toolOpened("accessibilityNodeInspected");
     }
 
     if (!gToolbox) {
       return;
     }
 
     gToolbox.selectTool("inspector").then(() =>
       gToolbox.selection.setNodeFront(nodeFront, reason));
--- a/devtools/client/shared/telemetry.js
+++ b/devtools/client/shared/telemetry.js
@@ -213,25 +213,16 @@ class Telemetry {
     if (charts.scalar) {
       this.scalarSet(charts.scalar, 1);
     }
     if (charts.countScalar) {
       this.scalarAdd(charts.countScalar, 1);
     }
   }
 
-  /**
-   * Record that an action occurred.  Aliases to `toolOpened`, so it's just for
-   * readability at the call site for cases where we aren't actually opening
-   * tools.
-   */
-  actionOccurred(id) {
-    this.toolOpened(id);
-  }
-
   toolClosed(id) {
     let charts = this.histograms[id];
 
     if (!charts || !charts.timerHistogram) {
       return;
     }
 
     this.finish(charts.timerHistogram);
--- a/devtools/client/webide/content/webide.js
+++ b/devtools/client/webide/content/webide.js
@@ -601,17 +601,17 @@ var UI = {
       } else {
         throw e;
       }
     }
 
     // Select project
     AppManager.selectedProject = project;
 
-    this._telemetry.actionOccurred("webideImportProject");
+    this._telemetry.toolOpened("webideImportProject");
   },
 
   // Remember the last selected project on the runtime
   saveLastSelectedProject: function() {
     let shouldRestore = Services.prefs.getBoolPref("devtools.webide.restoreLastProject");
     if (!shouldRestore) {
       return;
     }
--- a/devtools/client/webide/modules/project-list.js
+++ b/devtools/client/webide/modules/project-list.js
@@ -75,17 +75,17 @@ ProjectList.prototype = {
       }
 
       // Retrieve added project
       let project = AppProjects.get(ret.location);
 
       // Select project
       AppManager.selectedProject = project;
 
-      self._telemetry.actionOccurred("webideNewProject");
+      self._telemetry.toolOpened("webideNewProject");
     })(), "creating new app");
   },
 
   importPackagedApp: function(location) {
     let parentWindow = this._parentWindow;
     let UI = this._UI;
     return UI.busyUntil((async function() {
       let directory = await utils.getPackagedDirectory(parentWindow, location);