mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
Bug 393951 - Remove appID from nsIExtensionManager.getIncompatibleItemList. r=rstrong, sr=vlad
This commit is contained in:
parent
601cb98049
commit
b1a9bebaab
@ -204,7 +204,7 @@ var gVersionInfoPage = {
|
||||
var em = Components.classes["@mozilla.org/extensions/manager;1"]
|
||||
.getService(nsIExtensionManager);
|
||||
// Retrieve the remaining incompatible items.
|
||||
gUpdateWizard.items = em.getIncompatibleItemList(null, null, null,
|
||||
gUpdateWizard.items = em.getIncompatibleItemList(null, null,
|
||||
nsIUpdateItem.TYPE_ANY,
|
||||
true, { });
|
||||
gUpdateWizard.items = gUpdateWizard.items.filter(function(item) {
|
||||
|
@ -198,7 +198,7 @@ interface nsIInstallLocation : nsISupports
|
||||
* XXXben - Some of this stuff should go into a management-ey interface,
|
||||
* some into an app-startup-ey interface.
|
||||
*/
|
||||
[scriptable, uuid(c6838785-ddb5-4886-8c05-4dd6424a01ac)]
|
||||
[scriptable, uuid(27571455-f0d3-4293-bb9c-4af60adfe9b9)]
|
||||
interface nsIExtensionManager : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -346,8 +346,6 @@ interface nsIExtensionManager : nsISupports
|
||||
/**
|
||||
* Retrieves a list of nsIUpdateItems of items that are incompatible
|
||||
* with the supplied parameters.
|
||||
* @param id
|
||||
* The id of the application to check compatibility against
|
||||
* @param appVersion
|
||||
* The version of the application to check compatibility against
|
||||
* @param platformVersion
|
||||
@ -361,8 +359,7 @@ interface nsIExtensionManager : nsISupports
|
||||
* The XPCJS reference to the number of items returned.
|
||||
* @returns An array of incompatible nsIUpdateItems.
|
||||
*/
|
||||
void getIncompatibleItemList(in AString id,
|
||||
in AString appVersion,
|
||||
void getIncompatibleItemList(in AString appVersion,
|
||||
in AString platformVersion,
|
||||
in unsigned long type,
|
||||
in boolean includeDisabled,
|
||||
|
@ -4984,12 +4984,12 @@ ExtensionManager.prototype = {
|
||||
},
|
||||
|
||||
/* See nsIExtensionManager.idl */
|
||||
getIncompatibleItemList: function EM_getIncompatibleItemList(id, appVersion,
|
||||
getIncompatibleItemList: function EM_getIncompatibleItemList(appVersion,
|
||||
platformVersion,
|
||||
type,
|
||||
includeDisabled,
|
||||
countRef) {
|
||||
var items = this.datasource.getIncompatibleItemList(id, appVersion ? appVersion : undefined,
|
||||
var items = this.datasource.getIncompatibleItemList(appVersion ? appVersion : undefined,
|
||||
platformVersion ? platformVersion : undefined,
|
||||
type, includeDisabled);
|
||||
countRef.value = items.length;
|
||||
@ -6636,8 +6636,6 @@ ExtensionsDataSource.prototype = {
|
||||
|
||||
/**
|
||||
* Gets a list of items that are incompatible with a specific application version.
|
||||
* @param appID
|
||||
* The ID of the application - XXXben unused?
|
||||
* @param appVersion
|
||||
* The Version of the application to check for incompatibility against.
|
||||
* @param platformVersion
|
||||
@ -6649,8 +6647,7 @@ ExtensionsDataSource.prototype = {
|
||||
* @returns An array of nsIUpdateItems that are incompatible with the application
|
||||
* ID/Version supplied.
|
||||
*/
|
||||
getIncompatibleItemList: function EMDS_getIncompatibleItemList(appID,
|
||||
appVersion,
|
||||
getIncompatibleItemList: function EMDS_getIncompatibleItemList(appVersion,
|
||||
platformVersion,
|
||||
desiredType,
|
||||
includeDisabled) {
|
||||
|
@ -160,7 +160,7 @@ function run_test() {
|
||||
gEM.disableItem(ADDONS[0].id);
|
||||
restartEM();
|
||||
|
||||
var items = gEM.getIncompatibleItemList("", "3", "3", Ci.nsIUpdateItem.TYPE_ANY,
|
||||
var items = gEM.getIncompatibleItemList("3", "3", Ci.nsIUpdateItem.TYPE_ANY,
|
||||
false, { });
|
||||
|
||||
// Verify only items incompatible with the next app version are returned
|
||||
|
@ -600,14 +600,14 @@ var gIncompatibleCheckPage = {
|
||||
|
||||
var em = CoC["@mozilla.org/extensions/manager;1"].
|
||||
getService(CoI.nsIExtensionManager);
|
||||
this.addons = em.getIncompatibleItemList("", gUpdates.update.extensionVersion,
|
||||
this.addons = em.getIncompatibleItemList(gUpdates.update.extensionVersion,
|
||||
gUpdates.update.platformVersion,
|
||||
CoI.nsIUpdateItem.TYPE_ANY, false,
|
||||
{ });
|
||||
if (this.addons.length > 0) {
|
||||
// Don't include add-ons that are already incompatible with the current
|
||||
// version of the application
|
||||
var addons = em.getIncompatibleItemList("", null, null,
|
||||
var addons = em.getIncompatibleItemList(null, null,
|
||||
CoI.nsIUpdateItem.TYPE_ANY, false,
|
||||
{ });
|
||||
for (var i = 0; i < addons.length; ++i) {
|
||||
|
@ -1520,14 +1520,14 @@ UpdateService.prototype = {
|
||||
getService(Ci.nsIExtensionManager);
|
||||
// Get the add-ons that are incompatible with the update's application
|
||||
// version and toolkit version.
|
||||
var currentAddons = em.getIncompatibleItemList("", this._update.extensionVersion,
|
||||
var currentAddons = em.getIncompatibleItemList(this._update.extensionVersion,
|
||||
this._update.platformVersion,
|
||||
Ci.nsIUpdateItem.TYPE_ANY,
|
||||
false, { });
|
||||
if (currentAddons.length > 0) {
|
||||
// Get the add-ons that are incompatible with the current application
|
||||
// version and toolkit version.
|
||||
var previousAddons = em.getIncompatibleItemList("", null, null,
|
||||
var previousAddons = em.getIncompatibleItemList(null, null,
|
||||
Ci.nsIUpdateItem.TYPE_ANY,
|
||||
false, { });
|
||||
// Don't include add-ons that are already incompatible with the current
|
||||
|
Loading…
Reference in New Issue
Block a user