зеркало из https://github.com/mozilla/pjs.git
Bug 537180 - Fennec uses old blocklisting URL [r=dtownsend a=blocking-fennec]
This commit is contained in:
Родитель
0ba496f012
Коммит
d775dae31d
|
@ -866,6 +866,17 @@ Blocklist.prototype = {
|
|||
if (addonList.length == 0)
|
||||
return;
|
||||
|
||||
if ("@mozilla.org/addons/blocklist-prompt;1" in Cc) {
|
||||
try {
|
||||
let blockedPrompter = Cc["@mozilla.org/addons/blocklist-prompt;1"]
|
||||
.getService(Ci.nsIBlocklistPrompt);
|
||||
blockedPrompter.prompt(addonList);
|
||||
} catch (e) {
|
||||
LOG(e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var args = {
|
||||
restart: false,
|
||||
list: addonList
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIPluginTag;
|
||||
interface nsIVariant;
|
||||
|
||||
[scriptable, uuid(8439f9c0-da03-4260-8b21-dc635eed28fb)]
|
||||
interface nsIBlocklistService : nsISupports
|
||||
|
@ -114,3 +115,32 @@ interface nsIBlocklistService : nsISupports
|
|||
[optional] in AString appVersion,
|
||||
[optional] in AString toolkitVersion);
|
||||
};
|
||||
|
||||
/**
|
||||
* nsIBlocklistPrompt is used, if available, by the default implementation of
|
||||
* nsIBlocklistService to display a confirmation UI to the user before blocking
|
||||
* extensions/plugins.
|
||||
*/
|
||||
[scriptable, uuid(36f97f40-b0c9-11df-94e2-0800200c9a66)]
|
||||
interface nsIBlocklistPrompt : nsISupports
|
||||
{
|
||||
/**
|
||||
* Prompt the user about newly blocked addons. The prompt is then resposible
|
||||
* for soft-blocking any addons that need to be afterwards
|
||||
*
|
||||
* @param aAddons
|
||||
* An array of addons and plugins that are blocked. These are javascript
|
||||
* objects with properties:
|
||||
* name - the plugin or extension name,
|
||||
* version - the version of the extension or plugin,
|
||||
* icon - the plugin or extension icon,
|
||||
* disable - can be used by the nsIBlocklistPrompt to allows users to decide
|
||||
* whether a soft-blocked add-on should be disabled,
|
||||
* blocked - true if the item is hard-blocked, false otherwise,
|
||||
* item - the nsIPluginTag or Addon object
|
||||
* @param aCount
|
||||
* The number of addons
|
||||
*/
|
||||
void prompt([array, size_is(aCount)] in nsIVariant aAddons,
|
||||
[optional] in PRUint32 aCount);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче