Bug 393951 - Remove appID from nsIExtensionManager.getIncompatibleItemList. r=rstrong, sr=vlad

This commit is contained in:
Ian van den Berg 2009-07-30 17:35:02 -07:00
parent 601cb98049
commit b1a9bebaab
6 changed files with 11 additions and 17 deletions

View File

@ -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) {

View File

@ -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,

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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