Bug 724145: add telemetry for whether keyword.URL is user-set, r=jaws, a=akeybl
authorGavin Sharp <gavin@gavinsharp.com>
Fri, 03 Feb 2012 15:52:36 -0800
changeset 85380 2fd8b0dffd5a8cd2b275b581ed57eaee95c72451
parent 85379 24c56a986b9f0cd543ec337d23185fb867c331ae
child 85381 000ff4f8c0953abb44e712f7d8617edb4cbfc387
child 85389 805226ae6764558c04e499f88a1ce88c21259170
push id582
push usergsharp@mozilla.com
push dateTue, 14 Feb 2012 19:40:57 +0000
treeherdermozilla-beta@2fd8b0dffd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, akeybl
bugs724145
milestone11.0
Bug 724145: add telemetry for whether keyword.URL is user-set, r=jaws, a=akeybl
browser/components/nsBrowserGlue.js
toolkit/components/telemetry/TelemetryHistograms.h
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -410,16 +410,19 @@ BrowserGlue.prototype = {
       aAddons.forEach(function(aAddon) {
         // If the add-on isn't user disabled or can't be enabled then skip it
         if (!aAddon.userDisabled || !(aAddon.permissions & AddonManager.PERM_CAN_ENABLE))
           return;
 
         browser.selectedTab = browser.addTab("about:newaddon?id=" + aAddon.id);
       })
     });
+
+    let keywordURLUserSet = Services.prefs.prefHasUserValue("keyword.URL");
+    Services.telemetry.getHistogramById("FX_KEYWORD_URL_USERSET").add(keywordURLUserSet);
   },
 
   _onQuitRequest: function BG__onQuitRequest(aCancelQuit, aQuitType) {
     // If user has already dismissed quit request, then do nothing
     if ((aCancelQuit instanceof Ci.nsISupportsPRBool) && aCancelQuit.data)
       return;
 
     // There are several cases where we won't show a dialog here:
--- a/toolkit/components/telemetry/TelemetryHistograms.h
+++ b/toolkit/components/telemetry/TelemetryHistograms.h
@@ -298,16 +298,17 @@ HISTOGRAM(THUNDERBIRD_INDEXING_RATE_MSG_
 
 /**
  * Firefox-specific telemetry.
  */
 #ifdef MOZ_PHOENIX
 HISTOGRAM(FX_TAB_ANIM_OPEN_MS, 1, 3000, 10, EXPONENTIAL, "Firefox: Time taken by the tab opening animation")
 HISTOGRAM(FX_TAB_ANIM_CLOSE_MS, 1, 3000, 10, EXPONENTIAL, "Firefox: Time taken by the tab closing animation")
 HISTOGRAM_BOOLEAN(FX_CONTEXT_SEARCH_AND_TAB_SELECT, "Firefox: Background tab was selected within 5 seconds of searching from the context menu")
+HISTOGRAM_BOOLEAN(FX_KEYWORD_URL_USERSET, "Firefox: keyword.URL has a user-set value")
 #endif
 
 HISTOGRAM_BOOLEAN(INNERWINDOWS_WITH_MUTATION_LISTENERS, "Deleted or to-be-reused innerwindow which has had mutation event listeners.")
 HISTOGRAM(XUL_REFLOW_MS, 1, 3000, 10, EXPONENTIAL, "xul reflows")
 HISTOGRAM(XUL_INITIAL_FRAME_CONSTRUCTION, 1, 3000, 10, EXPONENTIAL, "initial xul frame construction")
 HISTOGRAM_BOOLEAN(XMLHTTPREQUEST_ASYNC_OR_SYNC, "Type of XMLHttpRequest, async or sync")
 
 /**