mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1023508 - Add telemetry for HiDPI usage. r=felipe
This commit is contained in:
parent
5c436f72de
commit
9defcbd877
@ -630,6 +630,22 @@ BrowserGlue.prototype = {
|
||||
nb.PRIORITY_INFO_LOW, buttons);
|
||||
},
|
||||
|
||||
_firstWindowTelemetry: function(aWindow) {
|
||||
#ifdef XP_WIN
|
||||
let SCALING_PROBE_NAME = "DISPLAY_SCALING_MSWIN";
|
||||
#elifdef XP_MACOSX
|
||||
let SCALING_PROBE_NAME = "DISPLAY_SCALING_OSX";
|
||||
#elifdef XP_LINUX
|
||||
let SCALING_PROBE_NAME = "DISPLAY_SCALING_LINUX";
|
||||
#else
|
||||
let SCALING_PROBE_NAME = "";
|
||||
#endif
|
||||
if (SCALING_PROBE_NAME) {
|
||||
let scaling = aWindow.devicePixelRatio * 100;
|
||||
Services.telemetry.getHistogramById(SCALING_PROBE_NAME).add(scaling);
|
||||
}
|
||||
},
|
||||
|
||||
// the first browser window has finished initializing
|
||||
_onFirstWindowLoaded: function BG__onFirstWindowLoaded(aWindow) {
|
||||
#ifdef XP_WIN
|
||||
@ -658,6 +674,8 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
|
||||
this._checkForOldBuildUpdates();
|
||||
|
||||
this._firstWindowTelemetry(aWindow);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -6446,5 +6446,29 @@
|
||||
"expires_in_version": "never",
|
||||
"kind": "flag",
|
||||
"description": "If a master-password is enabled for this profile"
|
||||
},
|
||||
"DISPLAY_SCALING_OSX" : {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user