Bug 882142 - Initiate Metro app update requests via retarting the app like Desktop Firefox does. r=jimm
--- a/browser/metro/base/content/flyoutpanels/AboutFlyoutPanel.js
+++ b/browser/metro/base/content/flyoutpanels/AboutFlyoutPanel.js
@@ -260,39 +260,27 @@ appUpdater.prototype =
let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].
createInstance(Components.interfaces.nsISupportsPRBool);
Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
// Something aborted the quit process.
if (cancelQuit.data)
return;
- // It's not possible for the Metro browser to restart itself.
- // The Windows background process ensures only one instance exists.
- // So start the update while the browser is open and close the browser
- // right after.
- try {
- Components.classes["@mozilla.org/updates/update-processor;1"].
- createInstance(Components.interfaces.nsIUpdateProcessor).
- processUpdate(null);
- } catch (e) {
- // If there was an error just close down and the next startup
- // will do this.
- }
-
let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
getService(Components.interfaces.nsIAppStartup);
// If already in safe mode restart in safe mode (bug 327119)
if (Services.appinfo.inSafeMode) {
appStartup.restartInSafeMode(Components.interfaces.nsIAppStartup.eAttemptQuit);
return;
}
- appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit);
+ appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit |
+ Components.interfaces.nsIAppStartup.eRestart);
return;
}
const URI_UPDATE_PROMPT_DIALOG = "chrome://mozapps/content/update/updates.xul";
// Firefox no longer displays a license for updates and the licenseURL check
// is just in case a distibution does.
if (this.update && (this.update.billboardURL || this.update.licenseURL ||
this.addons.length != 0)) {