Bug 1621353 - Map yandex distribution IDs. r=mixedpuppy

Differential Revision: https://phabricator.services.mozilla.com/D67331
This commit is contained in:
Michael Kaply
2020-03-18 17:42:13 +00:00
parent fab1211118
commit af5e47b14f

View File

@@ -442,6 +442,22 @@ DistributionCustomizer.prototype = {
}
}
if (this._ini.getString("Global", "id") == "yandex") {
// All yandex distributions have the same distribution ID,
// so we're using an internal preference to name them correctly.
// This is needed for search to work properly.
try {
defaults.set(
"distribution.id",
defaults
.get("extensions.yasearch@yandex.ru.clids.vendor")
.replace("firefox", "yandex")
);
} catch (e) {
// Just use the default distribution ID.
}
}
let localizedStr = Cc["@mozilla.org/pref-localizedstring;1"].createInstance(
Ci.nsIPrefLocalizedString
);