Bug 552756: Use consistent naming of loadGroup to fix auth and cookie issues. r=robstrong

This commit is contained in:
Dave Townsend 2010-04-28 09:33:43 -07:00
parent 5504b2f505
commit b1e2a2d8c3
3 changed files with 20 additions and 20 deletions

View File

@ -374,20 +374,20 @@ var AddonManagerInternal = {
* An optional placeholder icon URL while the add-on is being downloaded
* @param version
* An optional placeholder version while the add-on is being downloaded
* @param loadgroup
* @param loadGroup
* An optional nsILoadGroup to associate any network requests with
* @throws if the url, callback or mimetype arguments are not specified
*/
getInstallForURL: function AMI_getInstallForURL(url, callback, mimetype, hash,
name, iconURL, version,
loadgroup) {
loadGroup) {
if (!url || !mimetype || !callback)
throw new TypeError("Invalid arguments");
for (let i = 0; i < this.providers.length; i++) {
if (callProvider(this.providers[i], "supportsMimetype", false, mimetype)) {
callProvider(this.providers[i], "getInstallForURL", null,
url, hash, name, iconURL, version, loadgroup,
url, hash, name, iconURL, version, loadGroup,
function(install) {
safeCall(callback, install);
});
@ -825,9 +825,9 @@ var AddonManager = {
getInstallForURL: function AM_getInstallForURL(url, callback, mimetype, hash,
name, iconURL, version,
loadgroup) {
loadGroup) {
AddonManagerInternal.getInstallForURL(url, callback, mimetype, hash, name,
iconURL, version, loadgroup);
iconURL, version, loadGroup);
},
getInstallForFile: function AM_getInstallForFile(file, callback, mimetype) {

View File

@ -1501,16 +1501,16 @@ var XPIProvider = {
* An icon URL for the install
* @param version
* A version for the install
* @param loadgroup
* A loadgroup to associate requests with
* @param loadGroup
* An nsILoadGroup to associate requests with
* @param callback
* A callback to pass the AddonInstall to
*/
getInstallForURL: function XPI_getInstallForURL(url, hash, name, iconURL,
version, loadgroup, callback) {
version, loadGroup, callback) {
AddonInstall.createDownload(function(install) {
callback(install.wrapper);
}, url, hash, name, iconURL, version, loadgroup);
}, url, hash, name, iconURL, version, loadGroup);
},
/**
@ -3077,17 +3077,17 @@ var XPIDatabase = {
* An optional URL of release notes for the add-on
* @param existingAddon
* The add-on this install will update if known
* @param loadgroup
* @param loadGroup
* The nsILoadGroup to associate any requests with
* @throws if the url is the url of a local file and the hash does not match
* or the add-on does not contain an valid install manifest
*/
function AddonInstall(callback, installLocation, url, hash, name, type, iconURL,
version, infoURL, existingAddon, loadgroup) {
version, infoURL, existingAddon, loadGroup) {
this.wrapper = new AddonInstallWrapper(this);
this.installLocation = installLocation;
this.sourceURL = url;
this.loadgroup = loadgroup;
this.loadGroup = loadGroup;
this.listeners = [];
this.existingAddon = existingAddon;
@ -3166,7 +3166,7 @@ AddonInstall.prototype = {
stream: null,
crypto: null,
hash: null,
loadgroup: null,
loadGroup: null,
listeners: null,
name: null,
@ -3380,7 +3380,7 @@ AddonInstall.prototype = {
listener.init(this, this.stream);
let channel = NetUtil.newChannel(this.sourceURL);
if (this.loadGroup)
channel.loadGroup = this.loadgroup;
channel.loadGroup = this.loadGroup;
// Verify that we don't end up on an insecure channel if we haven't got a
// hash to verify with (see bug 537761 for discussion)
@ -3734,15 +3734,15 @@ AddonInstall.createInstall = function(callback, file) {
* An icon URL for the add-on
* @param version
* A version for the add-on
* @param loadgroup
* @param loadGroup
* An nsILoadGroup to associate the download with
*/
AddonInstall.createDownload = function(callback, uri, hash, name, iconURL,
version, loadgroup) {
version, loadGroup) {
let location = XPIProvider.installLocationsByName[KEY_APP_PROFILE];
let url = NetUtil.newURI(uri);
new AddonInstall(callback, location, url, hash, name, null,
iconURL, version, null, null, loadgroup);
iconURL, version, null, null, loadGroup);
};
/**

View File

@ -106,10 +106,10 @@ amManager.prototype = {
retval = false;
}
let loadgroup = null;
let loadGroup = null;
try {
loadgroup = window.QueryInterface(Ci.nsIInterfaceRequestor)
loadGroup = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocumentLoader).loadGroup;
}
@ -153,7 +153,7 @@ amManager.prototype = {
callback.callback(uri, UNSUPPORTED_TYPE);
}
buildNextInstall();
}, mimetype, hashes.shift(), names.shift(), icons.shift(), null, loadgroup);
}, mimetype, hashes.shift(), names.shift(), icons.shift(), null, loadGroup);
}
buildNextInstall();