зеркало из https://github.com/mozilla/gecko-dev.git
Bug 668842 - Add locale to telemetry metadata; r=rstrong,tglek
This commit is contained in:
Родитель
3e4044476c
Коммит
edf618660e
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче