Bug 1141122: supply a more canonical alternative to about:loopconversation in Loop conversation gUM prompts. r=florian

This commit is contained in:
Mike de Boer 2015-03-12 16:54:33 +01:00
Родитель 3f4e59d102
Коммит bbb45546ef
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -167,8 +167,15 @@ function getHost(uri, href) {
} catch (ex) {};
if (!host) {
if (uri && uri.scheme.toLowerCase() == "about") {
// For about URIs, just use the full spec, without any #hash parts
host = uri.specIgnoringRef;
// Special case-ing Loop/ Hello gUM requests.
if (uri.specIgnoringRef == "about:loopconversation") {
const kBundleURI = "chrome://browser/locale/loop/loop.properties";
let bundle = Services.strings.createBundle(kBundleURI);
host = bundle.GetStringFromName("clientShortname2");
} else {
// For other about URIs, just use the full spec, without any #hash parts.
host = uri.specIgnoringRef;
}
} else {
// This is unfortunate, but we should display *something*...
const kBundleURI = "chrome://browser/locale/browser.properties";