Bug 1398972 - Update Histograms.json r?liuche draft
authorDoug Thayer <dothayer@mozilla.com>
Tue, 31 Oct 2017 11:39:18 -0700
changeset 689653 2e954c04ea1b
parent 689652 310af6df980d
child 738363 703d2bdcc3b0
push id87073
push userbmo:dothayer@mozilla.com
push dateTue, 31 Oct 2017 20:46:58 +0000
reviewersliuche
bugs1398972
milestone58.0a1
Bug 1398972 - Update Histograms.json r?liuche Since the user can now block Flash and ask the browser to remember that decision, the histogram that collects user's choices on this has to be updated with a fourth option. MozReview-Commit-ID: J4r6nJIiaeQ
browser/base/content/browser-plugins.js
toolkit/components/telemetry/Histograms.json
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -142,17 +142,17 @@ var gPluginHandler = {
    * and activate plugins if necessary.
    * aNewState should be either "allownow" "allowalways" or "block"
    */
   _updatePluginPermission(aBrowser, aPluginInfo, aNewState) {
     let permission;
     let expireType;
     let expireTime;
     let histogram =
-      Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_USER_ACTION");
+      Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_USER_ACTION_2");
 
     let notification = PopupNotifications.getNotification("click-to-play-plugins", aBrowser);
 
     // Update the permission manager.
     // Also update the current state of pluginInfo.fallbackType so that
     // subsequent opening of the notification shows the current state.
     switch (aNewState) {
       case "allownow":
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -8290,24 +8290,24 @@
     "releaseChannelCollection": "opt-out",
     "expires_in_version": "60",
     "kind": "enumerated",
     "n_values": 5,
     "description": "The number of plugins present in the click-to-activate notification, minus one (1, 2, 3, 4, more than 4)",
     "bug_numbers": [902075, 1345894],
     "alert_emails": ["bsmedberg@mozilla.com"]
   },
-  "PLUGINS_NOTIFICATION_USER_ACTION": {
-    "record_in_processes": ["main", "content"],
-    "releaseChannelCollection": "opt-out",
-    "expires_in_version": "60",
-    "kind": "enumerated",
-    "n_values": 3,
-    "description": "User actions taken in the plugin notification: 0: allownow 1: allowalways 2: block",
-    "bug_numbers": [902075, 1345894],
+  "PLUGINS_NOTIFICATION_USER_ACTION_2": {
+    "record_in_processes": ["main", "content"],
+    "releaseChannelCollection": "opt-out",
+    "expires_in_version": "60",
+    "kind": "enumerated",
+    "n_values": 8,
+    "description": "User actions taken in the plugin notification: 0: allownow 1: allowalways 2: block 3: blockalways",
+    "bug_numbers": [902075, 1345894, 1398972],
     "alert_emails": ["bsmedberg@mozilla.com"]
   },
   "PLUGINS_INFOBAR_SHOWN": {
     "record_in_processes": ["main"],
     "releaseChannelCollection": "opt-out",
     "expires_in_version": "60",
     "kind": "boolean",
     "description": "Count of when the hidden-plugin infobar was displayed.",