Bug 1357146 - Remove BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS telemetry. r=jaws
authorDimiL <dlee@mozilla.com>
Tue, 06 Jun 2017 09:35:00 +0800
changeset 410598 ec1ca0d0f8ec1a25f5d167ad8a6ec24311bb1e12
parent 410597 bb505b001f5f6ca6421b81651ce9a4b9fc23b4a4
child 410599 4eec513103917702b10147724052bb7046e49045
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1357146
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1357146 - Remove BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS telemetry. r=jaws MozReview-Commit-ID: JMmYqA0TAIb
browser/components/nsBrowserGlue.js
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/histogram-whitelists.json
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -2485,18 +2485,16 @@ ContentPermissionPrompt.prototype = {
       request.cancel();
       throw ex;
     }
   },
 };
 
 var DefaultBrowserCheck = {
   get OPTIONPOPUP() { return "defaultBrowserNotificationPopup" },
-  _setAsDefaultTimer: null,
-  _setAsDefaultButtonClickStartTime: 0,
 
   closePrompt(aNode) {
     if (this._notification) {
       this._notification.close();
     }
   },
 
   setAsDefault() {
@@ -2509,43 +2507,16 @@ var DefaultBrowserCheck = {
         // only show the protocol association screen on Windows 8+.
         // Windows 8 is version 6.2.
         let version = Services.sysinfo.getProperty("version");
         claimAllTypes = (parseFloat(version) < 6.2);
       } catch (ex) { }
     }
     try {
       ShellService.setDefaultBrowser(claimAllTypes, false);
-
-      if (this._setAsDefaultTimer) {
-        this._setAsDefaultTimer.cancel();
-      }
-
-      this._setAsDefaultButtonClickStartTime = Math.floor(Date.now() / 1000);
-      this._setAsDefaultTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
-      this._setAsDefaultTimer.init(() => {
-        let isDefault = false;
-        let isDefaultError = false;
-        try {
-          isDefault = ShellService.isDefaultBrowser(true, false);
-        } catch (ex) {
-          isDefaultError = true;
-        }
-
-        let now = Math.floor(Date.now() / 1000);
-        let runTime = now - this._setAsDefaultButtonClickStartTime;
-        if (isDefault || runTime > 600) {
-          this._setAsDefaultTimer.cancel();
-          this._setAsDefaultTimer = null;
-          Services.telemetry.getHistogramById("BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS")
-                            .add(runTime);
-        }
-        Services.telemetry.getHistogramById("BROWSER_IS_USER_DEFAULT_ERROR")
-                          .add(isDefaultError);
-      }, 1000, Ci.nsITimer.TYPE_REPEATING_SLACK);
     } catch (ex) {
       setAsDefaultError = true;
       Cu.reportError(ex);
     }
     // Here BROWSER_IS_USER_DEFAULT and BROWSER_SET_USER_DEFAULT_ERROR appear
     // to be inverse of each other, but that is only because this function is
     // called when the browser is set as the default. During startup we record
     // the BROWSER_IS_USER_DEFAULT value without recording BROWSER_SET_USER_DEFAULT_ERROR.
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -10062,25 +10062,16 @@
   },
   "BROWSER_SET_DEFAULT_ERROR": {
     "record_in_processes": ["main", "content"],
     "expires_in_version": "never",
     "kind": "boolean",
     "releaseChannelCollection": "opt-out",
     "description": "True if the browser was unable to set Firefox as the default browser"
   },
-  "BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS": {
-    "record_in_processes": ["main", "content"],
-    "expires_in_version": "never",
-    "kind": "exponential",
-    "high": 500,
-    "n_buckets": 15,
-    "releaseChannelCollection": "opt-out",
-    "description": "Time to successfully set Firefox as the default browser after clicking 'Set Firefox as Default'. Should be near-instant in some environments, others require user interaction. Measured in seconds."
-  },
   "BROWSER_IS_ASSIST_DEFAULT": {
     "record_in_processes": ["main", "content"],
     "expires_in_version": "never",
     "kind": "boolean",
     "description": "The result of the default browser check for assist intent."
   },
   "MIXED_CONTENT_PAGE_LOAD": {
     "record_in_processes": ["main", "content"],
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -13,17 +13,16 @@
     "BROWSERPROVIDER_XUL_IMPORT_BOOKMARKS",
     "BROWSER_IS_ASSIST_DEFAULT",
     "BROWSER_IS_USER_DEFAULT",
     "BROWSER_IS_USER_DEFAULT_ERROR",
     "BROWSER_SET_DEFAULT_ALWAYS_CHECK",
     "BROWSER_SET_DEFAULT_DIALOG_PROMPT_RAWCOUNT",
     "BROWSER_SET_DEFAULT_ERROR",
     "BROWSER_SET_DEFAULT_RESULT",
-    "BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS",
     "BR_9_2_1_SUBJECT_ALT_NAMES",
     "BR_9_2_2_SUBJECT_COMMON_NAME",
     "CACHE_DEVICE_SEARCH_2",
     "CACHE_DISK_SEARCH_2",
     "CACHE_LM_INCONSISTENT",
     "CACHE_MEMORY_SEARCH_2",
     "CACHE_OFFLINE_SEARCH_2",
     "CACHE_SERVICE_LOCK_WAIT_2",
@@ -652,17 +651,16 @@
     "BROWSERPROVIDER_XUL_IMPORT_BOOKMARKS",
     "BROWSER_IS_ASSIST_DEFAULT",
     "BROWSER_IS_USER_DEFAULT",
     "BROWSER_IS_USER_DEFAULT_ERROR",
     "BROWSER_SET_DEFAULT_ALWAYS_CHECK",
     "BROWSER_SET_DEFAULT_DIALOG_PROMPT_RAWCOUNT",
     "BROWSER_SET_DEFAULT_ERROR",
     "BROWSER_SET_DEFAULT_RESULT",
-    "BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS",
     "BR_9_2_1_SUBJECT_ALT_NAMES",
     "BR_9_2_2_SUBJECT_COMMON_NAME",
     "BUCKET_ORDER_ERRORS",
     "CACHE_DEVICE_SEARCH_2",
     "CACHE_DISK_SEARCH_2",
     "CACHE_LM_INCONSISTENT",
     "CACHE_MEMORY_SEARCH_2",
     "CACHE_OFFLINE_SEARCH_2",