rem: 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":      break; case "Update:Ended":    canFinish = true; break; case "Update:App:Error": gUpdateWizard.errorOnApp = true; break; case "Update:App:Ended":   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: "", nsIUpdateItem.TYPE_APP); gUpdateWizard.itemsToUpdate.splice(0, 0, item); } 
add: document.documentElement.advance(); 
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: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/6e92b6ec803acb9761402ec385e344a6d2187a5b/update.js/clean/toolkit/mozapps/update/content/update.js