зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1627546 - Update urlFormatter to use new Region.jsm r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D76947
This commit is contained in:
Родитель
baf1cd4924
Коммит
d6c0f56661
|
@ -30,6 +30,12 @@ ChromeUtils.defineModuleGetter(
|
|||
"resource://gre/modules/UpdateUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"Region",
|
||||
"resource://gre/modules/Region.jsm"
|
||||
);
|
||||
|
||||
function nsURLFormatterService() {
|
||||
XPCOMUtils.defineLazyGetter(this, "ABI", function UFS_ABI() {
|
||||
let ABI = "default";
|
||||
|
@ -80,7 +86,7 @@ nsURLFormatterService.prototype = {
|
|||
try {
|
||||
// When the geoip lookup failed to identify the region, we fallback to
|
||||
// the 'ZZ' region code to mean 'unknown'.
|
||||
return Services.prefs.getCharPref("browser.search.region") || "ZZ";
|
||||
return Region.home || "ZZ";
|
||||
} catch (e) {
|
||||
return "ZZ";
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче