Bug 1038145 - Make use of the new infoURL item from the blocklist for plugins with an update. r=irving

This commit is contained in:
Alessio Placitelli
2014-10-15 15:23:22 +02:00
parent 5f0d7140f2
commit a1dd7ae955
3 changed files with 79 additions and 24 deletions

View File

@@ -251,13 +251,19 @@ var gPluginHandler = {
continue;
}
let url;
// TODO: allow the blocklist to specify a better link, bug 873093
// If a block contains an infoURL, we should always prefer that to the default
// URL that we construct in-product, even for other blocklist types.
let url = Services.blocklist.getPluginInfoURL(pluginInfo.pluginTag);
if (pluginInfo.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE) {
url = Services.urlFormatter.formatURLPref("plugins.update.url");
if (!url) {
url = Services.urlFormatter.formatURLPref("plugins.update.url");
}
}
else if (pluginInfo.blocklistState != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
url = Services.blocklist.getPluginBlocklistURL(pluginInfo.pluginTag);
if (!url) {
url = Services.blocklist.getPluginBlocklistURL(pluginInfo.pluginTag);
}
}
else {
url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "clicktoplay";