summaryrefslogtreecommitdiffstats
path: root/toolkit/components/urlformatter
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/urlformatter')
-rw-r--r--toolkit/components/urlformatter/nsURLFormatter.js9
-rw-r--r--toolkit/components/urlformatter/tests/unit/test_urlformatter.js6
2 files changed, 2 insertions, 13 deletions
diff --git a/toolkit/components/urlformatter/nsURLFormatter.js b/toolkit/components/urlformatter/nsURLFormatter.js
index 970de0537..a4a8e1f47 100644
--- a/toolkit/components/urlformatter/nsURLFormatter.js
+++ b/toolkit/components/urlformatter/nsURLFormatter.js
@@ -91,15 +91,6 @@ nsURLFormatterService.prototype = {
LOCALE: () => Cc["@mozilla.org/chrome/chrome-registry;1"].
getService(Ci.nsIXULChromeRegistry).
getSelectedLocale('global'),
- REGION: function() {
- 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";
- } catch(e) {
- return "ZZ";
- }
- },
VENDOR: function() { return this.appInfo.vendor; },
NAME: function() { return this.appInfo.name; },
ID: function() { return this.appInfo.ID; },
diff --git a/toolkit/components/urlformatter/tests/unit/test_urlformatter.js b/toolkit/components/urlformatter/tests/unit/test_urlformatter.js
index 393b0dc33..6f218822a 100644
--- a/toolkit/components/urlformatter/tests/unit/test_urlformatter.js
+++ b/toolkit/components/urlformatter/tests/unit/test_urlformatter.js
@@ -27,11 +27,9 @@ function run_test() {
QueryInterface(Ci.nsIXULRuntime);
var abi = macutils && macutils.isUniversalBinary ? "Universal-gcc3" : appInfo.XPCOMABI;
- let channel = "default";
let defaults = prefs.QueryInterface(Ci.nsIPrefService).getDefaultBranch(null);
- try {
- channel = defaults.getCharPref("app.update.channel");
- } catch (e) {}
+ let channel = defaults.getCharPref("app.update.channel", "default");
+
// Set distribution values.
defaults.setCharPref("distribution.id", "bacon");
defaults.setCharPref("distribution.version", "1.0");