Bug 695811 - Checking for updates logs two warnings about deprecated XMLHttpRequest attributes. r=bbondy, r=dhylands

This commit is contained in:
Robert Strong 2013-02-01 18:58:48 -08:00
parent 2614e5ce8e
commit 49aee920ea
5 changed files with 4 additions and 54 deletions

View File

@ -96,11 +96,6 @@ UpdateCheckListener.prototype = {
Services.aus.QueryInterface(Ci.nsIUpdateCheckListener);
Services.aus.onError(request, update);
},
onProgress: function UCL_onProgress(request, position, totalSize) {
Services.aus.QueryInterface(Ci.nsIUpdateCheckListener);
Services.aus.onProgress(request, position, totalSize);
}
};

View File

@ -282,17 +282,10 @@ appUpdater.prototype =
/**
* Implements nsIUpdateCheckListener. The methods implemented by
* nsIUpdateCheckListener have to be in a different scope from
* nsIIncrementalDownload because both nsIUpdateCheckListener and
* nsIIncrementalDownload implement onProgress.
* nsIUpdateCheckListener are in a different scope from nsIIncrementalDownload
* to make it clear which are used by each interface.
*/
updateCheckListener: {
/**
* See nsIUpdateService.idl
*/
onProgress: function(aRequest, aPosition, aTotalSize) {
},
/**
* See nsIUpdateService.idl
*/

View File

@ -612,15 +612,6 @@ var gCheckingPage = {
* update check commences.
*/
updateListener: {
/**
* See nsIUpdateCheckListener
*/
onProgress: function(request, position, totalSize) {
var pm = document.getElementById("checkingProgress");
pm.mode = "normal";
pm.value = Math.floor(100 * (position / totalSize));
},
/**
* See nsIUpdateCheckListener
*/

View File

@ -277,23 +277,9 @@ interface nsIUpdate : nsISupports
* check operation. This object is notified as the check continues, finishes
* and if it has an error.
*/
[scriptable, uuid(8cbceb6e-8e27-46f2-8808-444c6499f836)]
[scriptable, uuid(4aa2b4bb-39ea-407b-98ff-89f19134d4c0)]
interface nsIUpdateCheckListener : nsISupports
{
/**
* Called every time there is a progress notification loading the Update
* Service file.
* @param request
* The nsIXMLHttpRequest handling the update check.
* @param position
* The current byte downloaded
* @param totalSize
* The total number of bytes that have to be downloaded
*/
void onProgress(in nsIXMLHttpRequest request,
in unsigned long position,
in unsigned long totalSize);
/**
* The update check was completed.
* @param request

View File

@ -2091,10 +2091,6 @@ UpdateService.prototype = {
this._attemptResume();
},
// nsIUpdateCheckListener
onProgress: function AUS_onProgress(request, position, totalSize) {
},
onCheckComplete: function AUS_onCheckComplete(request, updates, updateCount) {
this._selectAndInstallUpdate(updates);
},
@ -3077,7 +3073,6 @@ Checker.prototype = {
var self = this;
this._request.addEventListener("error", function(event) { self.onError(event); } ,false);
this._request.addEventListener("load", function(event) { self.onLoad(event); }, false);
this._request.addEventListener("progress", function(event) { self.onProgress(event); }, false);
LOG("Checker:checkForUpdates - sending request to: " + url);
this._request.send(null);
@ -3085,16 +3080,6 @@ Checker.prototype = {
this._callback = listener;
},
/**
* When progress associated with the XMLHttpRequest is received.
* @param event
* The nsIDOMLSProgressEvent for the load.
*/
onProgress: function UC_onProgress(event) {
LOG("Checker:onProgress - " + event.position + "/" + event.totalSize);
this._callback.onProgress(event.target, event.position, event.totalSize);
},
/**
* Returns an array of nsIUpdate objects discovered by the update check.
* @throws if the XML document element node name is not updates.
@ -3214,7 +3199,7 @@ Checker.prototype = {
/**
* There was an error of some kind during the XMLHttpRequest
* @param event
* The nsIDOMEvent for the load
* The nsIDOMEvent for the error
*/
onError: function UC_onError(event) {
var request = event.target;