From 2c46cd7788a353492fda678ce22241e4e3eec380 Mon Sep 17 00:00:00 2001 From: flyingrub Date: Fri, 17 Mar 2017 11:31:10 +0100 Subject: [PATCH] Bug 1121966 - Change DISPLAY_SCALING_ histograms to a single r=chutten DISPLAY_SCALING Replaced the os specific histograms by a single one. MozReview-Commit-ID: FTwJmxh9sGu --HG-- extra : rebase_source : 333719632ae2b658685249c51e7a8fbda20cfcde --- browser/components/nsBrowserGlue.js | 22 ++++-------------- toolkit/components/telemetry/Histograms.json | 23 ++++--------------- .../telemetry/histogram-whitelists.json | 6 ----- 3 files changed, 8 insertions(+), 43 deletions(-) diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index 867149d6444e..5ee8f38a2fce 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -780,24 +780,10 @@ BrowserGlue.prototype = { }, _firstWindowTelemetry(aWindow) { - let SCALING_PROBE_NAME = ""; - switch (AppConstants.platform) { - case "win": - SCALING_PROBE_NAME = "DISPLAY_SCALING_MSWIN"; - break; - case "macosx": - SCALING_PROBE_NAME = "DISPLAY_SCALING_OSX"; - break; - case "linux": - SCALING_PROBE_NAME = "DISPLAY_SCALING_LINUX"; - break; - } - if (SCALING_PROBE_NAME) { - let scaling = aWindow.devicePixelRatio * 100; - try { - Services.telemetry.getHistogramById(SCALING_PROBE_NAME).add(scaling); - } catch (ex) {} - } + let scaling = aWindow.devicePixelRatio * 100; + try { + Services.telemetry.getHistogramById("DISPLAY_SCALING").add(scaling); + } catch (ex) {} }, // the first browser window has finished initializing diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 0ffb7d7421c4..bb66f9fd313c 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -9444,29 +9444,14 @@ "kind": "flag", "description": "If a master-password is enabled for this profile" }, - "DISPLAY_SCALING_OSX" : { + "DISPLAY_SCALING" : { "expires_in_version": "never", "kind": "linear", "high": 500, "n_buckets": 100, - "description": "Scaling percentage for the display where the first window is opened (OS X only)", - "cpp_guard": "XP_MACOSX" - }, - "DISPLAY_SCALING_MSWIN" : { - "expires_in_version": "never", - "kind": "linear", - "high": 500, - "n_buckets": 100, - "description": "Scaling percentage for the display where the first window is opened (MS Windows only)", - "cpp_guard": "XP_WIN" - }, - "DISPLAY_SCALING_LINUX" : { - "expires_in_version": "never", - "kind": "linear", - "high": 500, - "n_buckets": 100, - "description": "Scaling percentage for the display where the first window is opened (Linux only)", - "cpp_guard": "XP_LINUX" + "bug_numbers": [1121966], + "alert_emails": ["dolske@mozilla.com"], + "description": "Scaling percentage for the display where the first window is opened" }, "SOCIAL_SIDEBAR_STATE": { "expires_in_version": "never", diff --git a/toolkit/components/telemetry/histogram-whitelists.json b/toolkit/components/telemetry/histogram-whitelists.json index 72b636e5f357..95e4deadff20 100644 --- a/toolkit/components/telemetry/histogram-whitelists.json +++ b/toolkit/components/telemetry/histogram-whitelists.json @@ -205,9 +205,6 @@ "DEVTOOLS_WEBIDE_TIME_ACTIVE_SECONDS", "DEVTOOLS_WEBIDE_USB_CONNECTION_RESULT", "DEVTOOLS_WEBIDE_WIFI_CONNECTION_RESULT", - "DISPLAY_SCALING_LINUX", - "DISPLAY_SCALING_MSWIN", - "DISPLAY_SCALING_OSX", "DNS_BLACKLIST_COUNT", "DNS_CLEANUP_AGE", "DNS_FAILED_LOOKUP_TIME", @@ -881,9 +878,6 @@ "DEVTOOLS_WEBIDE_TIME_ACTIVE_SECONDS", "DEVTOOLS_WEBIDE_USB_CONNECTION_RESULT", "DEVTOOLS_WEBIDE_WIFI_CONNECTION_RESULT", - "DISPLAY_SCALING_LINUX", - "DISPLAY_SCALING_MSWIN", - "DISPLAY_SCALING_OSX", "DNS_BLACKLIST_COUNT", "DNS_CLEANUP_AGE", "DNS_FAILED_LOOKUP_TIME",