Bug 668842 - Add locale to telemetry metadata; r=rstrong,tglek

This commit is contained in:
Zbigniew Braniecki 2011-07-13 19:00:04 +02:00
parent 3e4044476c
commit edf618660e

View File

@ -63,6 +63,12 @@ const MEM_HISTOGRAMS = {
"page-faults-hard": "PAGE_FAULTS_HARD"
};
function getLocale() {
return Cc["@mozilla.org/chrome/chrome-registry;1"].
getService(Ci.nsIXULChromeRegistry).
getSelectedLocale('global');
}
XPCOMUtils.defineLazyGetter(this, "Telemetry", function () {
return Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
});
@ -143,6 +149,7 @@ function getMetadata(reason) {
appName: ai.name,
appBuildID: ai.appBuildID,
platformBuildID: ai.platformBuildID,
locale: getLocale(),
};
// sysinfo fields is not always available, get what we can.