Bug 1353848 - Add the 'searchresults' category to the telemetry histogram bucket list. r?mconley draft
authorJared Wein <jwein@mozilla.com>
Wed, 05 Apr 2017 15:40:13 -0400
changeset 556374 ce2ecc84927826da5868a8f43cd9932456a8ea18
parent 556373 61fa7c80fff5db2e904719829e9c2dccc44f1339
child 556376 30eb78401ea2125b6c56131e6cc2a88b2daf272f
push id52532
push userbmo:jaws@mozilla.com
push dateWed, 05 Apr 2017 19:40:29 +0000
reviewersmconley
bugs1353848
milestone55.0a1
Bug 1353848 - Add the 'searchresults' category to the telemetry histogram bucket list. r?mconley We need to run toLowerCase() on the category name because the searchresults category is actually searchResults. MozReview-Commit-ID: 1AgSULER7N4
browser/components/preferences/in-content/preferences.js
--- a/browser/components/preferences/in-content/preferences.js
+++ b/browser/components/preferences/in-content/preferences.js
@@ -114,23 +114,25 @@ function init_dynamic_padding() {
   `;
   let mediaStyle = document.createElementNS("http://www.w3.org/1999/xhtml", "html:style");
   mediaStyle.setAttribute("type", "text/css");
   mediaStyle.appendChild(document.createCDATASection(mediaRule));
   document.documentElement.appendChild(mediaStyle);
 }
 
 function telemetryBucketForCategory(category) {
+  category = category.toLowerCase();
   switch (category) {
     case "applications":
     case "advanced":
     case "containers":
     case "general":
     case "privacy":
     case "sync":
+    case "searchresults":
       return category;
     default:
       return "unknown";
   }
 }
 
 function onHashChange() {
   gotoPref();