Bug 882142 - Initiate Metro app update requests via retarting the app like Desktop Firefox does. r=jimm
authorBrian R. Bondy <netzen@gmail.com>
Tue, 10 Sep 2013 10:24:56 -0400
changeset 146352 42411ca90ef300c5e80fd43896d78de974e2f2f2
parent 146351 f8f04499e62a0acc9801655d35c3ca844e1322dc
child 146353 282aa46c82d145a91c9cbc227f59950cc28ebfc2
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjimm
bugs882142
milestone26.0a1
Bug 882142 - Initiate Metro app update requests via retarting the app like Desktop Firefox does. r=jimm
browser/metro/base/content/flyoutpanels/AboutFlyoutPanel.js
--- 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)) {