rem: case "Update:Extension:Item-Error": if (aSubject) { var item = aSubject.QueryInterface(Components.interfaces.nsIUpdateItem); gUpdateWizard.errorItems.push(item); 
add: case "Version:Extension:Item-Error": ++this._completeCount; var progress = document.getElementById("checking.progress"); progress.value = Math.ceil((this._completeCount / this.totalCount) * 100);  break; case "Version:Extension:Ended": gVersionPage.uninit();  if (gUpdateWizard.items.length == 0) {   var updateStrings = document.getElementById("updateStrings"); var status = document.getElementById("checking.status"); status.setAttribute("value", updateStrings.getString("versionUpdateComplete"));  var closeTimer = Components.classes["@mozilla.org/timer;1"] .createInstance(Components.interfaces.nsITimer); closeTimer.initWithCallback(this, 2000, Components.interfaces.nsITimer.TYPE_REPEATING_SLACK); break; 
context:   observe: function (aSubject, aTopic, aData)  {    var canFinish = false;    switch (aTopic) {    case "Update:Extension:Started":      break;    case "Update:Extension:Item-Started":      break;    case "Update:Extension:Item-Ended":      var item = aSubject.QueryInterface(Components.interfaces.nsIUpdateItem);      gUpdateWizard.itemsToUpdate.push(item);            ++this._completeCount;            var progress = document.getElementById("checking.progress");      progress.value = Math.ceil(this._completeCount / gUpdateWizard.itemsToUpdate.length) * 100;            break;    case "Update:Extension:Item-Error":      if (aSubject) {        var item = aSubject.QueryInterface(Components.interfaces.nsIUpdateItem);        gUpdateWizard.errorItems.push(item);      }      else {        for (var i = 0; i < gUpdateWizard.items.length; ++i) {          if (!gUpdateWizard.items[i].updateRDF)            gUpdateWizard.errorItems.push(gUpdateWizard.items[i]);        }      }      break;    case "Update:Extension:Ended":      // If we were passed a set of extensions/themes/other to update, this      // means we're not checking for app updates, so don't wait for the app      // update to complete before advancing (because there is none).      // canFinish = gUpdateWizard.items.length > 0;      // XXXben      break;    case "Update:Ended":      // If we're doing a general update check, (that is, no specific extensions/themes      // were passed in for us to check for updates to), this notification means both      // extension and app updates have completed.      canFinish = true;      break;    case "Update:App:Error":      gUpdateWizard.errorOnApp = true;      break;    case "Update:App:Ended":      // The "Updates Found" page of the update wizard needs to know if it there are app       // updates so it can list them first.       var pref = Components.classes["@mozilla.org/preferences-service;1"]                           .getService(Components.interfaces.nsIPrefBranch);      gUpdateWizard.appUpdatesAvailable = pref.getBoolPref(PREF_UPDATE_APP_UPDATESAVAILABLE);            if (gUpdateWizard.appUpdatesAvailable) {        var appID = pref.getCharPref(PREF_APP_ID);        var updates = Components.classes["@mozilla.org/updates/update-service;1"]                                .getService(Components.interfaces.nsIUpdateService);                        var brandShortName = document.getElementById("brandStrings").getString("brandShortName");        var item = Components.classes["@mozilla.org/updates/item;1"]                             .createInstance(Components.interfaces.nsIUpdateItem);        item.init(appID, updates.appUpdateVersion,                  "", "",                   brandShortName, -1, updates.appUpdateURL,                   "chrome://mozapps/skin/update/icon32.png",                   "", nsIUpdateItem.TYPE_APP);        gUpdateWizard.itemsToUpdate.splice(0, 0, item);      }      break;    }    if (canFinish) {          gUpdatePage.uninit();      if (gUpdateWizard.itemsToUpdate.length > 0 || gUpdateWizard.appUpdatesAvailable)        document.getElementById("checking").setAttribute("next", "found");      document.documentElement.advance();    }  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/bea8454b205f7120e28765dc8aca7db388284c22/update.js/clean/toolkit/mozapps/update/content/update.js