Bug 406184: PlugIns installed in the user profile directory are not loaded. r=robstrong

This commit is contained in:
dtownsend@oxymoronical.com 2008-03-06 18:02:49 -08:00
Родитель ce825ee68c
Коммит e91d3b16fe
6 изменённых файлов: 15 добавлений и 15 удалений

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

@ -1031,7 +1031,7 @@ function Startup()
} catch(e) { }
// Sort on startup and anytime an add-on is installed or upgraded.
gExtensionManager.sortTypeByProperty(nsIUpdateItem.TYPE_ADDON, "name", true);
gExtensionManager.sortTypeByProperty(nsIUpdateItem.TYPE_ANY, "name", true);
// Extension Command Updating is handled by a command controller.
gExtensionsView.controllers.appendController(gExtensionsViewController);
gExtensionsView.addEventListener("select", onAddonSelect, false);
@ -1283,7 +1283,7 @@ XPInstallDownloadManager.prototype = {
break;
case nsIXPIProgressDialog.DIALOG_CLOSE:
// Sort on startup and anytime an add-on is installed or upgraded.
gExtensionManager.sortTypeByProperty(nsIUpdateItem.TYPE_ADDON, "name", true);
gExtensionManager.sortTypeByProperty(nsIUpdateItem.TYPE_ANY, "name", true);
// XXXrstrong - installs may be made compatible after this notification
// see bug 351819
// For updates on startup always enable the continue button after the

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

@ -62,7 +62,7 @@ var gUpdateWizard = {
var em = Components.classes["@mozilla.org/extensions/manager;1"]
.getService(nsIExtensionManager);
// Retrieve all items in order to sync their app compatibility information
this.items = em.getItemList(nsIUpdateItem.TYPE_ADDON, { });
this.items = em.getItemList(nsIUpdateItem.TYPE_ANY, { });
var pref =
Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch);
@ -201,7 +201,7 @@ var gVersionInfoPage = {
.getService(nsIExtensionManager);
// Retrieve the remaining incompatible items.
gUpdateWizard.items = em.getIncompatibleItemList(null, null, null,
nsIUpdateItem.TYPE_ADDON,
nsIUpdateItem.TYPE_ANY,
true, { });
if (gUpdateWizard.items.length > 0) {
// There are still incompatible addons, inform the user.

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

@ -550,7 +550,7 @@ interface nsIUpdateItem : nsISupports
const unsigned long TYPE_LOCALE = 0x08;
const unsigned long TYPE_MULTI_XPI = 0x20;
const unsigned long TYPE_ADDON = TYPE_EXTENSION + TYPE_THEME + TYPE_LOCALE;
const unsigned long TYPE_ANY = TYPE_APP + TYPE_ADDON;
const unsigned long TYPE_ANY = 0xff;
/**
* The type of this item.

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

@ -2737,7 +2737,7 @@ ExtensionManager.prototype = {
if (!getPref("getBoolPref", PREF_EM_UPDATE_ENABLED, true))
return;
var items = this.getItemList(Ci.nsIUpdateItem.TYPE_ADDON, { });
var items = this.getItemList(Ci.nsIUpdateItem.TYPE_ANY, { });
var updater = new ExtensionItemUpdater(this);
updater.checkForUpdates(items, items.length,
@ -3871,8 +3871,8 @@ ExtensionManager.prototype = {
//
// To do this we obtain a list of active extensions and themes and write
// these to the extensions.ini file in the profile directory.
var validExtensions = this._getActiveItems(Ci.nsIUpdateItem.TYPE_EXTENSION +
Ci.nsIUpdateItem.TYPE_LOCALE);
var validExtensions = this._getActiveItems(Ci.nsIUpdateItem.TYPE_ANY -
Ci.nsIUpdateItem.TYPE_THEME);
var validThemes = this._getActiveItems(Ci.nsIUpdateItem.TYPE_THEME);
var extensionsLocationsFile = getFile(KEY_PROFILEDIR, [FILE_EXTENSION_MANIFEST]);
@ -4594,7 +4594,7 @@ ExtensionManager.prototype = {
needsRestart = internalName == gPref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);
return needsRestart;
}
return ((type & Ci.nsIUpdateItem.TYPE_ANY) > 0);
return ((type & Ci.nsIUpdateItem.TYPE_ADDON) > 0);
},
/**
@ -5263,7 +5263,7 @@ ExtensionManager.prototype = {
}
if (items.length == 0)
items = this.getItemList(Ci.nsIUpdateItem.TYPE_ADDON, { });
items = this.getItemList(Ci.nsIUpdateItem.TYPE_ANY, { });
var updater = new ExtensionItemUpdater(this);
updater.checkForUpdates(items, items.length, updateCheckType, listener);
@ -5281,7 +5281,7 @@ ExtensionManager.prototype = {
*/
checkForBlocklistChanges: function() {
var ds = this.datasource;
var items = this.getItemList(Ci.nsIUpdateItem.TYPE_ADDON, { });
var items = this.getItemList(Ci.nsIUpdateItem.TYPE_ANY, { });
for (var i = 0; i < items.length; ++i) {
var id = items[i].id;
ds.updateProperty(id, "blocklisted");
@ -5289,7 +5289,7 @@ ExtensionManager.prototype = {
this._appEnableItem(id);
}
items = ds.getBlocklistedItemList(null, null, Ci.nsIUpdateItem.TYPE_ADDON,
items = ds.getBlocklistedItemList(null, null, Ci.nsIUpdateItem.TYPE_ANY,
false);
for (i = 0; i < items.length; ++i)
this._appDisableItem(items[i].id);

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

@ -708,7 +708,7 @@ var gUpdatesAvailablePage = {
.getService(Components.interfaces.nsIExtensionManager);
var items = em.getIncompatibleItemList("", gUpdates.update.version,
gUpdates.update.platformVersion,
nsIUpdateItem.TYPE_ADDON, false,
nsIUpdateItem.TYPE_ANY, false,
{ });
if (items.length > 0) {
// There are addons that are incompatible with this update, so show the

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

@ -3156,7 +3156,7 @@ function isCompatible(update) {
Components.classes["@mozilla.org/extensions/manager;1"].
getService(nsIExtensionManager);
var items = em.getIncompatibleItemList("", update.extensionVersion,
update.platformVersion, nsIUpdateItem.TYPE_ADDON, false, { });
update.platformVersion, nsIUpdateItem.TYPE_ANY, false, { });
return items.length == 0;
#else
return true;
@ -3280,7 +3280,7 @@ function showPromptIfNoIncompatibilities(update) {
Components.classes["@mozilla.org/extensions/manager;1"].
getService(nsIExtensionManager);
var items = em.getIncompatibleItemList("", update.extensionVersion,
update.platformVersion, nsIUpdateItem.TYPE_ADDON, false, { });
update.platformVersion, nsIUpdateItem.TYPE_ANY, false, { });
var listener = new Listener(items);
// See documentation on |mode| above.
var mode = getPref("getIntPref", PREF_APP_UPDATE_INCOMPATIBLE_MODE,