Bug 1344711 - hand cleanup of cases that were ignored by the script to remove try blocks around get*Pref calls, r=jaws.

This commit is contained in:
Florian Quèze
2017-03-07 15:29:48 +01:00
parent c7eae86054
commit 0b17fc5d60
11 changed files with 35 additions and 91 deletions

View File

@@ -996,17 +996,15 @@ function QueryParameter(aName, aValue, aPurpose) {
function ParamSubstitution(aParamValue, aSearchTerms, aEngine) {
var value = aParamValue;
var distributionID = Services.appinfo.distributionID;
try {
distributionID = Services.prefs.getCharPref(BROWSER_SEARCH_PREF + "distributionID");
} catch (ex) { }
var official = MOZ_OFFICIAL;
try {
if (Services.prefs.getBoolPref(BROWSER_SEARCH_PREF + "official"))
official = "official";
else
official = "unofficial";
} catch (ex) { }
var distributionID =
Services.prefs.getCharPref(BROWSER_SEARCH_PREF + "distributionID",
Services.appinfo.distributionID || "");
var official;
if (Services.prefs.getBoolPref(BROWSER_SEARCH_PREF + "official", MOZ_OFFICIAL))
official = "official";
else
official = "unofficial";
// Custom search parameters. These are only available to default search
// engines.