Rollback bad changes. DONTBUILD
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Fri, 13 May 2016 23:01:39 -0400
changeset 491532 441d74febb7b8fc33ba3c0ffbc64423f48b90d6a
parent 491531 e3799b6017b9d8bae07d4893f5fd0eee2a5779a7
child 491533 0cee74c3de68994ee53c4640c5bebc0644c121d1
push id47343
push userbmo:dothayer@mozilla.com
push dateWed, 01 Mar 2017 22:58:58 +0000
milestone49.0a1
Rollback bad changes. DONTBUILD
browser/app/Makefile.in
browser/app/macbuild/Contents/Info.plist.in
browser/base/content/aboutDialog-appUpdater.js
browser/base/content/browser.js
browser/installer/package-manifest.in
old-configure.in
toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
toolkit/locales/en-US/chrome/mozapps/update/updates.properties
toolkit/mozapps/update/UpdateTelemetry.jsm
toolkit/mozapps/update/content/updates.js
toolkit/mozapps/update/content/updates.xul
toolkit/mozapps/update/nsIUpdateService.idl
toolkit/mozapps/update/nsUpdateService.js
toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
toolkit/mozapps/update/updater/Launchd.plist
toolkit/mozapps/update/updater/Makefile.in
toolkit/mozapps/update/updater/launchchild_osx.mm
toolkit/mozapps/update/updater/macbuild/Contents/Info.plist
toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in
toolkit/mozapps/update/updater/moz.build
toolkit/mozapps/update/updater/progressui.h
toolkit/mozapps/update/updater/progressui_osx.mm
toolkit/mozapps/update/updater/updater-common.build
toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in
toolkit/mozapps/update/updater/updater.cpp
toolkit/xre/MacLaunchHelper.h
toolkit/xre/MacLaunchHelper.mm
toolkit/xre/moz.build
toolkit/xre/nsUpdateDriver.cpp
toolkit/xre/updaterfileutils_osx.h
toolkit/xre/updaterfileutils_osx.mm
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -82,13 +82,10 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_
 	sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(dist_dest)/Contents/Info.plist
 	sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(dist_dest)/$(LPROJ)/InfoPlist.strings
 	rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(dist_dest)/Contents/Resources
 	rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(dist_dest)/Contents/MacOS
 	$(RM) $(dist_dest)/Contents/MacOS/$(MOZ_APP_NAME)
 	rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) $(dist_dest)/Contents/MacOS
 	cp -RL $(DIST)/branding/firefox.icns $(dist_dest)/Contents/Resources/firefox.icns
 	cp -RL $(DIST)/branding/document.icns $(dist_dest)/Contents/Resources/document.icns
-	$(MKDIR) -p $(dist_dest)/Contents/Library/LaunchServices
-	mv -f $(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater $(dist_dest)/Contents/Library/LaunchServices
-	ln -s ../../../../Library/LaunchServices/org.mozilla.updater $(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater
 	printf APPLMOZB > $(dist_dest)/Contents/PkgInfo
 endif
--- a/browser/app/macbuild/Contents/Info.plist.in
+++ b/browser/app/macbuild/Contents/Info.plist.in
@@ -206,17 +206,12 @@
 	<key>LSApplicationCategoryType</key>
 	<string>public.app-category.productivity</string>
 	<key>LSMinimumSystemVersion</key>
 	<string>10.6</string>
   <key>NSSupportsAutomaticGraphicsSwitching</key>
   <true/>
   <key>NSPrincipalClass</key>
   <string>GeckoNSApplication</string>
-	<key>SMPrivilegedExecutables</key>
-	<dict>
-		<key>org.mozilla.updater</key>
-		<string>identifier "org.mozilla.updater" and ((anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9]) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "43AQ936H96"))</string>
-	</dict>
   <key>NSDisablePersistence</key>
   <true/>
 </dict>
 </plist>
--- a/browser/base/content/aboutDialog-appUpdater.js
+++ b/browser/base/content/aboutDialog-appUpdater.js
@@ -5,19 +5,16 @@
 // Note: this file is included in aboutDialog.xul if MOZ_UPDATER is defined.
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
                                   "resource://gre/modules/UpdateUtils.jsm");
 
-const PREF_APP_UPDATE_CANCELATIONS_OSX = "app.update.cancelations.osx";
-const PREF_APP_UPDATE_ELEVATE_NEVER    = "app.update.elevate.never";
-
 var gAppUpdater;
 
 function onUnload(aEvent) {
   if (gAppUpdater.isChecking)
     gAppUpdater.checker.stopChecking(Components.interfaces.nsIUpdateChecker.CURRENT_CHECK);
   // Safe to call even when there isn't a download in progress.
   gAppUpdater.removeDownloadListener();
   gAppUpdater = null;
@@ -74,18 +71,17 @@ function appUpdater()
     // selectPanel("downloading") is called from setupDownloadingUI().
     return;
   }
 
   // Honor the "Never check for updates" option by not only disabling background
   // update checks, but also in the About dialog, by presenting a
   // "Check for updates" button.
   // If updates are found, the user is then asked if he wants to "Update to <version>".
-  if (!this.updateEnabled ||
-      Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) {
+  if (!this.updateEnabled) {
     this.selectPanel("checkForUpdates");
     return;
   }
 
   // That leaves the options
   // "Check for updates, but let me choose whether to install them", and
   // "Automatically install updates".
   // In both cases, we check for updates without asking.
@@ -97,23 +93,21 @@ appUpdater.prototype =
 {
   // true when there is an update check in progress.
   isChecking: false,
 
   // true when there is an update already staged / ready to be applied.
   get isPending() {
     if (this.update) {
       return this.update.state == "pending" ||
-             this.update.state == "pending-service" ||
-             this.update.state == "pending-elevate";
+             this.update.state == "pending-service";
     }
     return this.um.activeUpdate &&
            (this.um.activeUpdate.state == "pending" ||
-            this.um.activeUpdate.state == "pending-service" ||
-            this.um.activeUpdate.state == "pending-elevate");
+            this.um.activeUpdate.state == "pending-service");
   },
 
   // true when there is an update already installed in the background.
   get isApplied() {
     if (this.update)
       return this.update.state == "applied" ||
              this.update.state == "applied-service";
     return this.um.activeUpdate &&
@@ -184,60 +178,51 @@ appUpdater.prototype =
       this.updateDeck.selectedPanel = panel;
     }
   },
 
   /**
    * Check for updates
    */
   checkForUpdates: function() {
-    // Clear prefs that could prevent a user from discovering available updates.
-    if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CANCELATIONS_OSX)) {
-      Services.prefs.clearUserPref(PREF_APP_UPDATE_CANCELATIONS_OSX);
-    }
-    if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) {
-      Services.prefs.clearUserPref(PREF_APP_UPDATE_ELEVATE_NEVER);
-    }
     this.selectPanel("checkingForUpdates");
     this.isChecking = true;
     this.checker.checkForUpdates(this.updateCheckListener, true);
     // after checking, onCheckComplete() is called
   },
 
   /**
    * Handles oncommand for the "Restart to Update" button
    * which is presented after the download has been downloaded.
    */
   buttonRestartAfterDownload: function() {
-    if (!this.isPending && !this.isApplied) {
-      return;
-    }
-
-    // Notify all windows that an application quit has been requested.
-    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) {
+    if (!this.isPending && !this.isApplied)
       return;
-    }
 
-    let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
-                     getService(Components.interfaces.nsIAppStartup);
+      // Notify all windows that an application quit has been requested.
+      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;
 
-    // If already in safe mode restart in safe mode (bug 327119)
-    if (Services.appinfo.inSafeMode) {
-      appStartup.restartInSafeMode(Components.interfaces.nsIAppStartup.eAttemptQuit);
-      return;
-    }
+      let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
+                       getService(Components.interfaces.nsIAppStartup);
 
-    appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit |
-                    Components.interfaces.nsIAppStartup.eRestart);
-  },
+      // 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 |
+                      Components.interfaces.nsIAppStartup.eRestart);
+    },
 
   /**
    * Handles oncommand for the "Apply Update…" button
    * which is presented if we need to show the billboard.
    */
   buttonApplyBillboard: function() {
     const URI_UPDATE_PROMPT_DIALOG = "chrome://mozapps/content/update/updates.xul";
     var ary = null;
@@ -381,18 +366,17 @@ appUpdater.prototype =
       if (this.backgroundUpdateEnabled) {
         this.selectPanel("applying");
         let update = this.um.activeUpdate;
         let self = this;
         Services.obs.addObserver(function (aSubject, aTopic, aData) {
           // Update the UI when the background updater is finished
           let status = aData;
           if (status == "applied" || status == "applied-service" ||
-              status == "pending" || status == "pending-service" ||
-              status == "pending-elevate") {
+              status == "pending" || status == "pending-service") {
             // If the update is successfully applied, or if the updater has
             // fallen back to non-staged updates, show the "Restart to Update"
             // button.
             self.selectPanel("apply");
           } else if (status == "failed") {
             // Background update has failed, let's show the UI responsible for
             // prompting the user to update manually.
             self.selectPanel("downloadFailed");
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -2553,17 +2553,16 @@ var gMenuButtonBadgeManager = {
   }
 };
 
 // Setup the hamburger button badges for updates, if enabled.
 var gMenuButtonUpdateBadge = {
   enabled: false,
   badgeWaitTime: 0,
   timer: null,
-  cancelObserverRegistered: false,
 
   init: function () {
     try {
       this.enabled = Services.prefs.getBoolPref("app.update.badge");
     } catch (e) {}
     if (this.enabled) {
       try {
         this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime");
@@ -2578,20 +2577,16 @@ var gMenuButtonUpdateBadge = {
   uninit: function () {
     if (this.timer)
       this.timer.cancel();
     if (this.enabled) {
       Services.obs.removeObserver(this, "update-staged");
       Services.obs.removeObserver(this, "update-downloaded");
       this.enabled = false;
     }
-    if (this.cancelObserverRegistered) {
-      Services.obs.removeObserver(this, "update-canceled");
-      this.cancelObserverRegistered = false;
-    }
   },
 
   onMenuPanelCommand: function(event) {
     if (event.originalTarget.getAttribute("update-status") === "succeeded") {
       // restart the app
       let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
                        .createInstance(Ci.nsISupportsPRBool);
       Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
@@ -2602,76 +2597,61 @@ var gMenuButtonUpdateBadge = {
     } else {
       // open the page for manual update
       let url = Services.urlFormatter.formatURLPref("app.update.url.manual");
       openUILinkIn(url, "tab");
     }
   },
 
   observe: function (subject, topic, status) {
-    if (topic == "update-canceled") {
-      this.reset();
-      return;
-    }
     if (status == "failed") {
       // Background update has failed, let's show the UI responsible for
       // prompting the user to update manually.
+      this.displayBadge(false);
       this.uninit();
-      this.displayBadge(false);
       return;
     }
 
     // Give the user badgeWaitTime seconds to react before prompting.
     this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     this.timer.initWithCallback(this, this.badgeWaitTime * 1000,
                                 this.timer.TYPE_ONE_SHOT);
     // The timer callback will call uninit() when it completes.
   },
 
   notify: function () {
     // If the update is successfully applied, or if the updater has fallen back
     // to non-staged updates, add a badge to the hamburger menu to indicate an
     // update will be applied once the browser restarts.
+    this.displayBadge(true);
     this.uninit();
-    this.displayBadge(true);
   },
 
   displayBadge: function (succeeded) {
     let status = succeeded ? "succeeded" : "failed";
     let badgeStatus = "update-" + status;
     gMenuButtonBadgeManager.addBadge(gMenuButtonBadgeManager.BADGEID_APPUPDATE, badgeStatus);
 
     let stringId;
     let updateButtonText;
     if (succeeded) {
       let brandBundle = document.getElementById("bundle_brand");
       let brandShortName = brandBundle.getString("brandShortName");
       stringId = "appmenu.restartNeeded.description";
       updateButtonText = gNavigatorBundle.getFormattedString(stringId,
                                                              [brandShortName]);
-      Services.obs.addObserver(this, "update-canceled", false);
-      this.cancelObserverRegistered = true;
     } else {
       stringId = "appmenu.updateFailed.description";
       updateButtonText = gNavigatorBundle.getString(stringId);
     }
 
     let updateButton = document.getElementById("PanelUI-update-status");
     updateButton.setAttribute("label", updateButtonText);
     updateButton.setAttribute("update-status", status);
     updateButton.hidden = false;
-  },
-
-  reset: function () {
-    gMenuButtonBadgeManager.removeBadge(
-      gMenuButtonBadgeManager.BADGEID_APPUPDATE);
-    let updateButton = document.getElementById("PanelUI-update-status");
-    updateButton.hidden = true;
-    this.uninit();
-    this.init();
   }
 };
 
 // Values for telemtery bins: see TLS_ERROR_REPORT_UI in Histograms.json
 const TLS_ERROR_REPORT_TELEMETRY_AUTO_CHECKED   = 2;
 const TLS_ERROR_REPORT_TELEMETRY_AUTO_UNCHECKED = 3;
 const TLS_ERROR_REPORT_TELEMETRY_MANUAL_SEND    = 4;
 const TLS_ERROR_REPORT_TELEMETRY_AUTO_SEND      = 5;
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -30,17 +30,16 @@
 ; Equals Contents/Resources/ on Mac OS X and is equivalent to @BINPATH@ on other
 ; platforms.
 
 #filter substitution
 
 #ifdef XP_MACOSX
 ; Mac bundle stuff
 @APPNAME@/Contents/Info.plist
-@APPNAME@/Contents/Library/LaunchServices
 @APPNAME@/Contents/PkgInfo
 @RESPATH@/firefox.icns
 @RESPATH@/document.icns
 @RESPATH@/@LPROJ_ROOT@.lproj/*
 #endif
 
 [@AB_CD@]
 @RESPATH@/browser/chrome/@AB_CD@@JAREXT@
--- a/old-configure.in
+++ b/old-configure.in
@@ -2956,17 +2956,17 @@ qt)
 
     AC_DEFINE(QT_NO_KEYWORDS)
     ;;
 
 cocoa)
     LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
     # Use -Wl as a trick to avoid -framework and framework names from
     # being separated by AC_SUBST_LIST.
-    TK_LIBS='-Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL -Wl,-framework,Security -Wl,-framework,ServiceManagement'
+    TK_LIBS='-Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL'
     TK_CFLAGS=""
     CFLAGS="$CFLAGS $TK_CFLAGS"
     CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
     MOZ_USER_DIR="Mozilla"
     MOZ_FS_LAYOUT=bundle
     ;;
 
 uikit)
--- a/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
+++ b/toolkit/locales/en-US/chrome/mozapps/update/updates.dtd
@@ -70,20 +70,16 @@
                                            can restart &brandShortName; now, or continue working and restart later.">
 
 <!ENTITY  finishedBackgroundPage.text     "A security and stability update for &brandShortName; has been
                                            downloaded and is ready to be installed.">
 <!ENTITY  finishedBackground.name         "Update:">
 <!-- LOCALIZATION NOTE (finishedBackground.more): This string describes the button labels defined by restartNowButton and restartLaterButton in updates.properties. -->
 <!ENTITY  finishedBackground.more         "The update will be installed the next time &brandShortName; starts. You
                                            can restart &brandShortName; now, or continue working and restart later.">
-<!ENTITY  finishedBackground.moreElevated "This update requires administrator privileges. The update will be
-                                           installed the next time &brandShortName; starts. You can restart
-                                           &brandShortName; now, continue working and restart later, or decline this
-                                           update.">
 
 <!ENTITY  installed.title                 "Update Installed">
 <!ENTITY  installed.intro                 "The update was successfully installed.">
 <!ENTITY  whatsnew.label                  "Read more about what’s new…">
 
 <!ENTITY  update.details.label            "Details">
 <!ENTITY  update.installedOn.label        "Installed on:">
 <!ENTITY  update.status.label             "Status:">
--- a/toolkit/locales/en-US/chrome/mozapps/update/updates.properties
+++ b/toolkit/locales/en-US/chrome/mozapps/update/updates.properties
@@ -65,17 +65,16 @@ hideButton.accesskey=H
 applyingUpdate=Applying update…
 
 updatesfound_minor.title=Update Available
 updatesfound_major.title=New Version Available
 
 installSuccess=The Update was successfully installed
 installPending=Install Pending
 patchApplyFailure=The Update could not be installed (patch apply failed)
-elevationFailure=You don’t have the permissions necessary to install this update. Please contact your system administrator.
 
 # LOCALIZATION NOTE: %S is the amount downloaded so far
 # example: Paused —  879 KB of 2.1 MB
 downloadPausedStatus=Paused —  %S
 
 check_error-200=Update XML file malformed (200)
 check_error-403=Access denied (403)
 check_error-404=Update XML file not found (404)
--- a/toolkit/mozapps/update/UpdateTelemetry.jsm
+++ b/toolkit/mozapps/update/UpdateTelemetry.jsm
@@ -98,22 +98,16 @@ this.AUSTLMY = {
   // Unable to check for updates due to no OS ABI (no notification)
   CHK_NO_OS_ABI: 31,
   // Invalid url for app.update.url default preference (no notification)
   CHK_INVALID_DEFAULT_URL: 32,
   // Invalid url for app.update.url user preference (no notification)
   CHK_INVALID_USER_OVERRIDE_URL: 33,
   // Invalid url for app.update.url.override user preference (no notification)
   CHK_INVALID_DEFAULT_OVERRIDE_URL: 34,
-  // Update elevation failures or cancelations threshold reached for this
-  // version, OSX only (no notification)
-  CHK_ELEVATION_DISABLED_FOR_VERSION: 35,
-  // User opted out of elevated updates for the available update version, OSX
-  // only (no notification)
-  CHK_ELEVATION_OPTOUT_FOR_VERSION: 36,
 
   /**
    * Submit a telemetry ping for the update check result code or a telemetry
    * ping for a count type histogram count when no update was found. The no
    * update found ping is separate since it is the typical result, is less
    * interesting than the other result codes, and it is easier to analyze the
    * other codes without including it.
    *
--- a/toolkit/mozapps/update/content/updates.js
+++ b/toolkit/mozapps/update/content/updates.js
@@ -13,38 +13,36 @@ CoU.import("resource://gre/modules/Downl
 CoU.import("resource://gre/modules/Services.jsm", this);
 CoU.import("resource://gre/modules/UpdateTelemetry.jsm", this);
 
 const XMLNS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
 const PREF_APP_UPDATE_BACKGROUNDERRORS    = "app.update.backgroundErrors";
 const PREF_APP_UPDATE_BILLBOARD_TEST_URL  = "app.update.billboard.test_url";
 const PREF_APP_UPDATE_CERT_ERRORS         = "app.update.cert.errors";
-const PREF_APP_UPDATE_ELEVATE_NEVER       = "app.update.elevate.never";
 const PREF_APP_UPDATE_ENABLED             = "app.update.enabled";
 const PREF_APP_UPDATE_LOG                 = "app.update.log";
 const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED = "app.update.notifiedUnsupported";
 const PREF_APP_UPDATE_TEST_LOOP           = "app.update.test.loop";
 const PREF_APP_UPDATE_URL_MANUAL          = "app.update.url.manual";
 
 const PREFBRANCH_APP_UPDATE_NEVER         = "app.update.never.";
 
 const PREF_PLUGINS_UPDATE_URL             = "plugins.update.url";
 
 const UPDATE_TEST_LOOP_INTERVAL = 2000;
 
 const URI_UPDATES_PROPERTIES  = "chrome://mozapps/locale/update/updates.properties";
 
 const STATE_DOWNLOADING       = "downloading";
 const STATE_PENDING           = "pending";
-const STATE_PENDING_SERVICE   = "pending-service";
-const STATE_PENDING_ELEVATE   = "pending-elevate";
+const STATE_PENDING_SVC       = "pending-service";
 const STATE_APPLYING          = "applying";
 const STATE_APPLIED           = "applied";
-const STATE_APPLIED_SERVICE   = "applied-service";
+const STATE_APPLIED_SVC       = "applied-service";
 const STATE_SUCCEEDED         = "succeeded";
 const STATE_DOWNLOAD_FAILED   = "download-failed";
 const STATE_FAILED            = "failed";
 
 const SRCEVT_FOREGROUND       = 1;
 const SRCEVT_BACKGROUND       = 2;
 
 const CERT_ATTR_CHECK_FAILED_NO_UPDATE  = 100;
@@ -231,29 +229,19 @@ var gUpdates = {
     if (strings)
       return this.strings.getFormattedString(key, strings);
     return this.strings.getString(key);
   },
 
   never: function () {
     // If the user clicks "No Thanks", we should not prompt them to update to
     // this version again unless they manually select "Check for Updates..."
-    // which will clear all of the "never" prefs. There are currently two
-    // "never" prefs: the older PREFBRANCH_APP_UPDATE_NEVER as well as the
-    // OSX-only PREF_APP_UPDATE_ELEVATE_NEVER. We set both of these prefs (if
-    // applicable) to ensure that we don't prompt the user regardless of which
-    // pref is checked.
-    let neverPrefName = PREFBRANCH_APP_UPDATE_NEVER + this.update.appVersion;
+    // which will clear all of the "never" prefs.
+    var neverPrefName = PREFBRANCH_APP_UPDATE_NEVER + this.update.appVersion;
     Services.prefs.setBoolPref(neverPrefName, true);
-    let aus = CoC["@mozilla.org/updates/update-service;1"].
-              getService(CoI.nsIApplicationUpdateService);
-    if (aus.elevationRequired) {
-      Services.prefs.setCharPref(PREF_APP_UPDATE_ELEVATE_NEVER,
-                                 this.update.appVersion);
-    }
   },
 
   /**
    * A hash of |pageid| attribute to page object. Can be used to dispatch
    * function calls to the appropriate page.
    */
   _pages: { },
 
@@ -421,20 +409,19 @@ var gUpdates = {
               state = STATE_DOWNLOAD_FAILED;
             }
           }
 
           // Now select the best page to start with, given the current state of
           // the Update.
           switch (state) {
             case STATE_PENDING:
-            case STATE_PENDING_SERVICE:
-            case STATE_PENDING_ELEVATE:
+            case STATE_PENDING_SVC:
             case STATE_APPLIED:
-            case STATE_APPLIED_SERVICE:
+            case STATE_APPLIED_SVC:
               this.sourceEvent = SRCEVT_BACKGROUND;
               aCallback("finishedBackground");
               return;
             case STATE_DOWNLOADING:
               aCallback("downloading");
               return;
             case STATE_FAILED:
               window.getAttention();
@@ -533,31 +520,26 @@ var gCheckingPage = {
     gUpdates.setButtons(null, null, null, false, true);
     gUpdates.wiz.getButton("cancel").focus();
 
     // Clear all of the "never" prefs to handle the scenario where the user
     // clicked "never" for an update, selected "Check for Updates...", and
     // then canceled.  If we don't clear the "never" prefs future
     // notifications will never happen.
     Services.prefs.deleteBranch(PREFBRANCH_APP_UPDATE_NEVER);
-    if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) {
-      Services.prefs.clearUserPref(PREF_APP_UPDATE_ELEVATE_NEVER);
-    }
 
     // The user will be notified if there is an error so clear the background
     // check error count.
-    if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS)) {
+    if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS))
       Services.prefs.clearUserPref(PREF_APP_UPDATE_BACKGROUNDERRORS);
-    }
 
     // The preference will be set back to true if the system is still
     // unsupported.
-    if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED)) {
+    if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED))
       Services.prefs.clearUserPref(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED);
-    }
 
     this._checker = CoC["@mozilla.org/updates/update-checker;1"].
                     createInstance(CoI.nsIUpdateChecker);
     this._checker.checkForUpdates(this.updateListener, true);
   },
 
   /**
    * The user has closed the window, either by pressing cancel or using a Window
@@ -581,17 +563,17 @@ var gCheckingPage = {
       gUpdates.setUpdate(aus.selectUpdate(updates, updates.length));
       if (gUpdates.update) {
         LOG("gCheckingPage", "onCheckComplete - update found");
         if (gUpdates.update.unsupported) {
           gUpdates.wiz.goTo("unsupported");
           return;
         }
 
-        if (!aus.canApplyUpdates || gUpdates.update.elevationFailure) {
+        if (!aus.canApplyUpdates) {
           // Prevent multiple notifications for the same update when the user is
           // unable to apply updates.
           gUpdates.never();
           gUpdates.wiz.goTo("manualUpdate");
           return;
         }
 
         gUpdates.wiz.goTo(gUpdates.updatesFoundPageId);
@@ -1309,20 +1291,19 @@ var gDownloadingPage = {
       if (aData == STATE_DOWNLOADING) {
         // We've fallen back to downloding the full update because the
         // partial update failed to get staged in the background.
         this._setStatus("downloading");
         return;
       }
       this.cleanUp();
       if (aData == STATE_APPLIED ||
-          aData == STATE_APPLIED_SERVICE ||
+          aData == STATE_APPLIED_SVC ||
           aData == STATE_PENDING ||
-          aData == STATE_PENDING_SERVICE ||
-          aData == STATE_PENDING_ELEVATE) {
+          aData == STATE_PENDING_SVC) {
         // If the update is successfully applied, or if the updater has
         // fallen back to non-staged updates, go to the finish page.
         gUpdates.wiz.goTo("finished");
       } else {
         gUpdates.wiz.goTo("errors");
       }
     }
   },
@@ -1413,17 +1394,17 @@ var gErrorPatchingPage = {
    */
   onPageShow: function() {
     gUpdates.setButtons(null, null, "okButton", true);
   },
 
   onWizardNext: function() {
     switch (gUpdates.update.selectedPatch.state) {
       case STATE_PENDING:
-      case STATE_PENDING_SERVICE:
+      case STATE_PENDING_SVC:
         gUpdates.wiz.goTo("finished");
         break;
       case STATE_DOWNLOADING:
         gUpdates.wiz.goTo("downloading");
         break;
       case STATE_DOWNLOAD_FAILED:
         gUpdates.wiz.goTo("errors");
         break;
@@ -1435,91 +1416,54 @@ var gErrorPatchingPage = {
  * The "Update has been downloaded" page. Shows information about what
  * was downloaded.
  */
 var gFinishedPage = {
   /**
    * Initialize
    */
   onPageShow: function() {
-    let aus = CoC["@mozilla.org/updates/update-service;1"].
-              getService(CoI.nsIApplicationUpdateService);
-    if (aus.elevationRequired) {
-      LOG("gFinishedPage", "elevationRequired");
-      gUpdates.setButtons("restartLaterButton", "noThanksButton",
-                          "restartNowButton", true);
-    } else {
-      LOG("gFinishedPage", "not elevationRequired");
-      gUpdates.setButtons("restartLaterButton", null, "restartNowButton",
-                          true);
-    }
+    gUpdates.setButtons("restartLaterButton", null, "restartNowButton",
+                        true);
     gUpdates.wiz.getButton("finish").focus();
   },
 
   /**
    * Initialize the Wizard Page for a Background Source Event
    */
   onPageShowBackground: function() {
     this.onPageShow();
-    let updateFinishedName = document.getElementById("updateFinishedName");
+    var updateFinishedName = document.getElementById("updateFinishedName");
     updateFinishedName.value = gUpdates.update.name;
 
-    let link = document.getElementById("finishedBackgroundLink");
+    var link = document.getElementById("finishedBackgroundLink");
     if (gUpdates.update.detailsURL) {
       link.setAttribute("url", gUpdates.update.detailsURL);
       // The details link is stealing focus so it is disabled by default and
       // should only be enabled after onPageShow has been called.
       link.disabled = false;
-    } else {
+    }
+    else
       link.hidden = true;
-    }
-    let aus = CoC["@mozilla.org/updates/update-service;1"].
-              getService(CoI.nsIApplicationUpdateService);
-    if (aus.elevationRequired) {
-      let more = document.getElementById("finishedBackgroundMore");
-      more.setAttribute("hidden", "true");
-      let moreElevated =
-        document.getElementById("finishedBackgroundMoreElevated");
-      moreElevated.setAttribute("hidden", "false");
-      let moreElevatedLink =
-        document.getElementById("finishedBackgroundMoreElevatedLink");
-      moreElevatedLink.setAttribute("hidden", "false");
-      let moreElevatedLinkLabel =
-        document.getElementById("finishedBackgroundMoreElevatedLinkLabel");
-      let manualURL = Services.urlFormatter.formatURLPref(PREF_APP_UPDATE_URL_MANUAL);
-      moreElevatedLinkLabel.value = manualURL;
-      moreElevatedLinkLabel.setAttribute("url", manualURL);
-      moreElevatedLinkLabel.setAttribute("hidden", "false");
-    }
 
     if (getPref("getBoolPref", PREF_APP_UPDATE_TEST_LOOP, false)) {
       setTimeout(function () {
                    gUpdates.wiz.getButton("finish").click();
                  }, UPDATE_TEST_LOOP_INTERVAL);
     }
   },
 
   /**
    * Called when the wizard finishes, i.e. the "Restart Now" button is
    * clicked.
    */
   onWizardFinish: function() {
     // Do the restart
     LOG("gFinishedPage" , "onWizardFinish - restarting the application");
 
-    let aus = CoC["@mozilla.org/updates/update-service;1"].
-              getService(CoI.nsIApplicationUpdateService);
-    if (aus.elevationRequired) {
-      let um = CoC["@mozilla.org/updates/update-manager;1"].
-               getService(CoI.nsIUpdateManager);
-      if (um) {
-        um.elevationOptedIn();
-      }
-    }
-
     // disable the "finish" (Restart) and "extra1" (Later) buttons
     // because the Software Update wizard is still up at the point,
     // and will remain up until we return and we close the
     // window with a |window.close()| in wizard.xml
     // (it was the firing the "wizardfinish" event that got us here.)
     // This prevents the user from switching back
     // to the Software Update dialog and clicking "Restart" or "Later"
     // when dealing with the "confirm close" prompts.
@@ -1550,29 +1494,17 @@ var gFinishedPage = {
   },
 
   /**
    * When the user clicks the "Restart Later" instead of the Restart Now" button
    * in the wizard after an update has been downloaded.
    */
   onExtra1: function() {
     gUpdates.wiz.cancel();
-  },
-
-  /**
-   * When elevation is required and the user clicks "No Thanks" in the wizard.
-   */
-  onExtra2: Task.async(function*() {
-    Services.obs.notifyObservers(null, "update-canceled", null);
-    let um = CoC["@mozilla.org/updates/update-manager;1"].
-               getService(CoI.nsIUpdateManager);
-    um.cleanupActiveUpdate();
-    gUpdates.never();
-    gUpdates.wiz.cancel();
-  }),
+  }
 };
 
 /**
  * The "Update was Installed Successfully" page.
  */
 var gInstalledPage = {
   /**
    * Initialize
--- a/toolkit/mozapps/update/content/updates.xul
+++ b/toolkit/mozapps/update/content/updates.xul
@@ -200,38 +200,29 @@
     <updateheader label="&finishedPage.title;"/>
     <vbox class="update-content" flex="1">
       <label>&finishedPage.text;</label>
     </vbox>
   </wizardpage>
 
   <wizardpage id="finishedBackground" pageid="finishedBackground"
               object="gFinishedPage" onextra1="gFinishedPage.onExtra1()"
-              onextra2="gFinishedPage.onExtra2()"
               onpageshow="gFinishedPage.onPageShowBackground();">
     <updateheader label="&finishedPage.title;"/>
     <vbox class="update-content" flex="1">
       <label>&finishedBackgroundPage.text;</label>
       <separator/>
       <hbox align="center">
         <label>&finishedBackground.name;</label>
         <label id="updateFinishedName" flex="1" crop="right" value=""/>
         <label id="finishedBackgroundLink" class="text-link" disabled="true"
                value="&details.link;" onclick="openUpdateURL(event);"/>
       </hbox>
       <spacer flex="1"/>
       <label id="finishedBackgroundMore">&finishedBackground.more;</label>
-      <label id="finishedBackgroundMoreElevated"
-             hidden="true">&finishedBackground.moreElevated;</label>
-      <label id="finishedBackgroundMoreElevatedLink"
-             hidden="true">&errorManual.label;</label>
-      <hbox>
-        <label class="text-link" id="finishedBackgroundMoreElevatedLinkLabel"
-               value="" onclick="openUpdateURL(event);" hidden="true"/>
-      </hbox>
     </vbox>
   </wizardpage>
 
   <wizardpage id="installed" pageid="installed" object="gInstalledPage"
               onpageshow="gInstalledPage.onPageShow();">
     <updateheader label="&installed.title;"/>
     <vbox class="update-content" flex="1">
       <label>&installed.intro;</label>
--- a/toolkit/mozapps/update/nsIUpdateService.idl
+++ b/toolkit/mozapps/update/nsIUpdateService.idl
@@ -82,17 +82,17 @@ interface nsIUpdatePatch : nsISupports
  * the current application - this update may have several available patches
  * from which one must be selected to download and install, for example we
  * might select a binary difference patch first and attempt to apply that,
  * then if the application process fails fall back to downloading a complete
  * file-replace patch. This object also contains information about the update
  * that the front end and other application services can use to learn more
  * about what is going on.
  */
-[scriptable, uuid(e094c045-f4ff-41fd-92da-cd2effd2c7c9)]
+[scriptable, uuid(6b0b7721-6746-443d-8cb0-c6199d7f28a6)]
 interface nsIUpdate : nsISupports
 {
   /**
    * The type of update:
    *   "major"  A major new version of the Application
    *   "minor"  A minor update to the Application (e.g. security update)
    */
   attribute AString type;
@@ -216,17 +216,16 @@ interface nsIUpdate : nsISupports
    */
   readonly attribute nsIUpdatePatch selectedPatch;
 
   /**
    * The state of the selected patch:
    *   "downloading"        The update is being downloaded.
    *   "pending"            The update is ready to be applied.
    *   "pending-service"    The update is ready to be applied with the service.
-   *   "pending-elevate"    The update is ready to be applied but requires elevation.
    *   "applying"           The update is being applied.
    *   "applied"            The update is ready to be switched to.
    *   "applied-os"         The update is OS update and to be installed.
    *   "applied-service"    The update is ready to be switched to with the service.
    *   "succeeded"          The update was successfully applied.
    *   "download-failed"    The update failed to be downloaded.
    *   "failed"             The update failed to be applied.
    */
@@ -239,21 +238,16 @@ interface nsIUpdate : nsISupports
    * attribute check has not failed the value is zero.
    *
    * TODO: Define typical error codes (for now, see updater/errors.h and the
    *       CERT_ATTR_CHECK_FAILED_* values in nsUpdateService.js)
    */
   attribute long errorCode;
 
   /**
-   * Whether an elevation failure has been encountered for this update.
-   */
-  attribute boolean elevationFailure;
-
-  /**
    * The number of patches supplied by this update.
    */
   readonly attribute unsigned long patchCount;
 
   /**
    * Retrieves a patch.
    * @param   index
    *          The index of the patch to retrieve.
@@ -345,17 +339,17 @@ interface nsIUpdateChecker : nsISupports
   void stopChecking(in unsigned short duration);
 };
 
 /**
  * An interface describing a global application service that handles performing
  * background update checks and provides utilities for selecting and
  * downloading update patches.
  */
-[scriptable, uuid(1107d207-a263-403a-b268-05772ec10757)]
+[scriptable, uuid(9f9b51f5-340e-47ce-85ae-9eb077c6cd39)]
 interface nsIApplicationUpdateService : nsISupports
 {
   /**
    * Checks for available updates in the background using the listener provided
    * by the application update service for background checks.
    */
   void checkForBackgroundUpdates();
 
@@ -425,22 +419,16 @@ interface nsIApplicationUpdateService : 
   /**
    * Whether or not the Update Service can check for updates. This is a function
    * of whether or not application update is disabled by the application and the
    * platform the application is running on.
    */
   readonly attribute boolean canCheckForUpdates;
 
   /**
-   * Whether or not the installation requires elevation. Currently only
-   * implemented on OSX, returns false on other platforms.
-   */
-  readonly attribute boolean elevationRequired;
-
-  /**
    * Whether or not the Update Service can download and install updates.
    * On Windows, this is a function of whether or not the maintenance service
    * is installed and enabled. On other systems, and as a fallback on Windows,
    * this depends on whether the current user has write access to the install
    * directory.
    */
   readonly attribute boolean canApplyUpdates;
 
@@ -475,17 +463,17 @@ interface nsIUpdateProcessor : nsISuppor
    */
   void processUpdate(in nsIUpdate update);
 };
 
 /**
  * An interface describing a global application service that maintains a list
  * of updates previously performed as well as the current active update.
  */
-[scriptable, uuid(0f1098e9-a447-4af9-b030-6f8f35c85f89)]
+[scriptable, uuid(f8371237-10a6-46a5-b23f-f6f7684e9d71)]
 interface nsIUpdateManager : nsISupports
 {
   /**
    * Gets the update at the specified index
    * @param   index
    *          The index within the updates array
    * @returns The nsIUpdate object at the specified index
    */
@@ -505,34 +493,23 @@ interface nsIUpdateManager : nsISupports
    * Saves all updates to disk.
    */
   void saveUpdates();
 
   /**
    * Refresh the update status based on the information in update.status.
    */
   void refreshUpdateStatus();
-
-  /**
-   * The user agreed to proceed with an elevated update and we are now
-   * permitted to show an elevation prompt.
-   */
-  void elevationOptedIn();
-
-  /**
-   * Clean up and remove the active update without applying it.
-   */
-  void cleanupActiveUpdate();
 };
 
 /**
  * An interface describing an object that can show various kinds of Update
  * notification UI to the user.
  */
-[scriptable, uuid(cee3bd60-c564-42ff-a2bf-d442cb15f75c)]
+[scriptable, uuid(599fd3c6-ec68-4499-ada5-2997739c97a6)]
 interface nsIUpdatePrompt : nsISupports
 {
   /**
    * Shows the application update checking user interface and checks if there
    * is an update available.
    */
   void checkForUpdates();
 
@@ -580,16 +557,9 @@ interface nsIUpdatePrompt : nsISupports
   void showUpdateError(in nsIUpdate update);
 
   /**
    * Shows a list of all updates installed to date.
    * @param   parent
    *          An nsIDOMWindow to set as the parent for this window. Can be null.
    */
   void showUpdateHistory(in nsIDOMWindow parent);
-
-  /**
-   * Shows the application update downloaded user interface advising that an
-   * update, which requires elevation, has now been downloaded and a restart is
-   * necessary to complete the update.
-   */
-  void showUpdateElevationRequired();
 };
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -13,50 +13,46 @@ Cu.import("resource://gre/modules/FileUt
 Cu.import("resource://gre/modules/Services.jsm", this);
 Cu.import("resource://gre/modules/ctypes.jsm", this);
 Cu.import("resource://gre/modules/UpdateTelemetry.jsm", this);
 Cu.import("resource://gre/modules/AppConstants.jsm", this);
 
 const UPDATESERVICE_CID = Components.ID("{B3C290A6-3943-4B89-8BBE-C01EB7B3B311}");
 const UPDATESERVICE_CONTRACTID = "@mozilla.org/updates/update-service;1";
 
-const PREF_APP_UPDATE_ALTWINDOWTYPE        = "app.update.altwindowtype";
-const PREF_APP_UPDATE_AUTO                 = "app.update.auto";
-const PREF_APP_UPDATE_BACKGROUND_INTERVAL  = "app.update.download.backgroundInterval";
-const PREF_APP_UPDATE_BACKGROUNDERRORS     = "app.update.backgroundErrors";
-const PREF_APP_UPDATE_BACKGROUNDMAXERRORS  = "app.update.backgroundMaxErrors";
-const PREF_APP_UPDATE_CANCELATIONS         = "app.update.cancelations";
-const PREF_APP_UPDATE_CANCELATIONS_OSX     = "app.update.cancelations.osx";
-const PREF_APP_UPDATE_CERTS_BRANCH         = "app.update.certs.";
-const PREF_APP_UPDATE_CERT_CHECKATTRS      = "app.update.cert.checkAttributes";
-const PREF_APP_UPDATE_CERT_ERRORS          = "app.update.cert.errors";
-const PREF_APP_UPDATE_CERT_MAXERRORS       = "app.update.cert.maxErrors";
-const PREF_APP_UPDATE_CERT_REQUIREBUILTIN  = "app.update.cert.requireBuiltIn";
-const PREF_APP_UPDATE_ELEVATE_NEVER        = "app.update.elevate.never";
-const PREF_APP_UPDATE_ELEVATE_VERSION      = "app.update.elevate.version";
-const PREF_APP_UPDATE_ENABLED              = "app.update.enabled";
-const PREF_APP_UPDATE_IDLETIME             = "app.update.idletime";
-const PREF_APP_UPDATE_INTERVAL             = "app.update.interval";
-const PREF_APP_UPDATE_LOG                  = "app.update.log";
-const PREF_APP_UPDATE_MAX_OSX_CANCELATIONS = "app.update.cancelations.osx.max";
-const PREF_APP_UPDATE_NEVER_BRANCH         = "app.update.never.";
-const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED  = "app.update.notifiedUnsupported";
-const PREF_APP_UPDATE_POSTUPDATE           = "app.update.postupdate";
-const PREF_APP_UPDATE_PROMPTWAITTIME       = "app.update.promptWaitTime";
-const PREF_APP_UPDATE_SHOW_INSTALLED_UI    = "app.update.showInstalledUI";
-const PREF_APP_UPDATE_SILENT               = "app.update.silent";
-const PREF_APP_UPDATE_STAGING_ENABLED      = "app.update.staging.enabled";
-const PREF_APP_UPDATE_URL                  = "app.update.url";
-const PREF_APP_UPDATE_URL_DETAILS          = "app.update.url.details";
-const PREF_APP_UPDATE_URL_OVERRIDE         = "app.update.url.override";
-const PREF_APP_UPDATE_SERVICE_ENABLED      = "app.update.service.enabled";
-const PREF_APP_UPDATE_SERVICE_ERRORS       = "app.update.service.errors";
-const PREF_APP_UPDATE_SERVICE_MAX_ERRORS   = "app.update.service.maxErrors";
-const PREF_APP_UPDATE_SOCKET_ERRORS        = "app.update.socket.maxErrors";
-const PREF_APP_UPDATE_RETRY_TIMEOUT        = "app.update.socket.retryTimeout";
+const PREF_APP_UPDATE_ALTWINDOWTYPE       = "app.update.altwindowtype";
+const PREF_APP_UPDATE_AUTO                = "app.update.auto";
+const PREF_APP_UPDATE_BACKGROUND_INTERVAL = "app.update.download.backgroundInterval";
+const PREF_APP_UPDATE_BACKGROUNDERRORS    = "app.update.backgroundErrors";
+const PREF_APP_UPDATE_BACKGROUNDMAXERRORS = "app.update.backgroundMaxErrors";
+const PREF_APP_UPDATE_CANCELATIONS        = "app.update.cancelations";
+const PREF_APP_UPDATE_CERTS_BRANCH        = "app.update.certs.";
+const PREF_APP_UPDATE_CERT_CHECKATTRS     = "app.update.cert.checkAttributes";
+const PREF_APP_UPDATE_CERT_ERRORS         = "app.update.cert.errors";
+const PREF_APP_UPDATE_CERT_MAXERRORS      = "app.update.cert.maxErrors";
+const PREF_APP_UPDATE_CERT_REQUIREBUILTIN = "app.update.cert.requireBuiltIn";
+const PREF_APP_UPDATE_ENABLED             = "app.update.enabled";
+const PREF_APP_UPDATE_IDLETIME            = "app.update.idletime";
+const PREF_APP_UPDATE_INTERVAL            = "app.update.interval";
+const PREF_APP_UPDATE_LOG                 = "app.update.log";
+const PREF_APP_UPDATE_NEVER_BRANCH        = "app.update.never.";
+const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED = "app.update.notifiedUnsupported";
+const PREF_APP_UPDATE_POSTUPDATE          = "app.update.postupdate";
+const PREF_APP_UPDATE_PROMPTWAITTIME      = "app.update.promptWaitTime";
+const PREF_APP_UPDATE_SHOW_INSTALLED_UI   = "app.update.showInstalledUI";
+const PREF_APP_UPDATE_SILENT              = "app.update.silent";
+const PREF_APP_UPDATE_STAGING_ENABLED     = "app.update.staging.enabled";
+const PREF_APP_UPDATE_URL                 = "app.update.url";
+const PREF_APP_UPDATE_URL_DETAILS         = "app.update.url.details";
+const PREF_APP_UPDATE_URL_OVERRIDE        = "app.update.url.override";
+const PREF_APP_UPDATE_SERVICE_ENABLED     = "app.update.service.enabled";
+const PREF_APP_UPDATE_SERVICE_ERRORS      = "app.update.service.errors";
+const PREF_APP_UPDATE_SERVICE_MAX_ERRORS  = "app.update.service.maxErrors";
+const PREF_APP_UPDATE_SOCKET_ERRORS       = "app.update.socket.maxErrors";
+const PREF_APP_UPDATE_RETRY_TIMEOUT       = "app.update.socket.retryTimeout";
 
 const URI_UPDATE_PROMPT_DIALOG  = "chrome://mozapps/content/update/updates.xul";
 const URI_UPDATE_HISTORY_DIALOG = "chrome://mozapps/content/update/history.xul";
 const URI_BRAND_PROPERTIES      = "chrome://branding/locale/brand.properties";
 const URI_UPDATES_PROPERTIES    = "chrome://mozapps/locale/update/updates.properties";
 const URI_UPDATE_NS             = "http://www.mozilla.org/2005/app-update";
 
 const KEY_GRED            = "GreD";
@@ -78,22 +74,21 @@ const FILE_UPDATES_DB     = "updates.xml
 const FILE_UPDATE_ACTIVE  = "active-update.xml";
 const FILE_PERMS_TEST     = "update.test";
 const FILE_LAST_LOG       = "last-update.log";
 const FILE_BACKUP_LOG     = "backup-update.log";
 
 const STATE_NONE            = "null";
 const STATE_DOWNLOADING     = "downloading";
 const STATE_PENDING         = "pending";
-const STATE_PENDING_SERVICE = "pending-service";
-const STATE_PENDING_ELEVATE = "pending-elevate";
+const STATE_PENDING_SVC     = "pending-service";
 const STATE_APPLYING        = "applying";
 const STATE_APPLIED         = "applied";
 const STATE_APPLIED_OS      = "applied-os";
-const STATE_APPLIED_SERVICE = "applied-service";
+const STATE_APPLIED_SVC     = "applied-service";
 const STATE_SUCCEEDED       = "succeeded";
 const STATE_DOWNLOAD_FAILED = "download-failed";
 const STATE_FAILED          = "failed";
 
 // The values below used by this code are from common/errors.h
 const WRITE_ERROR                          = 7;
 const ELEVATION_CANCELED                   = 9;
 const SERVICE_UPDATER_COULD_NOT_BE_STARTED = 24;
@@ -183,35 +178,16 @@ const DEFAULT_SERVICE_MAX_ERRORS = 10;
 
 // The number of consecutive socket errors to allow before falling back to
 // downloading a different MAR file or failing if already downloading the full.
 const DEFAULT_SOCKET_MAX_ERRORS = 10;
 
 // The number of milliseconds to wait before retrying a connection error.
 const DEFAULT_UPDATE_RETRY_TIMEOUT = 2000;
 
-// Default maximum number of elevation cancelations per update version before
-// giving up.
-const DEFAULT_MAX_OSX_CANCELATIONS = 3;
-
-// This maps app IDs to their respective notification topic which signals when
-// app startup is complete.
-const APPID_TO_TOPIC = {
-  // Firefox
-  "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}": "sessionstore-windows-restored",
-  // SeaMonkey
-  "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}": "sessionstore-windows-restored",
-  // Fennec
-  "{aa3c5121-dab2-40e2-81ca-7ea25febc110}": "sessionstore-windows-restored",
-  // Thunderbird
-  "{3550f703-e582-4d05-9a08-453d09bdfdc6}": "mail-startup-done",
-  // Instantbird
-  "{33cb9019-c295-46dd-be21-8c4936574bee}": "xul-window-visible",
-};
-
 var gLocale = null;
 var gUpdateMutexHandle = null;
 
 // Gonk only
 var gSDCardMountLock = null;
 
 // Gonk only
 XPCOMUtils.defineLazyGetter(this, "gExtStorage", function aus_gExtStorage() {
@@ -351,106 +327,56 @@ function hasUpdateMutex() {
     return true;
   }
   if (!gUpdateMutexHandle) {
     gUpdateMutexHandle = createMutex(getPerInstallationMutexName(true), false);
   }
   return !!gUpdateMutexHandle;
 }
 
-/**
- * Determines whether or not all descendants of a directory are writeable.
- * Note: Does not check the root directory itself for writeability.
- *
- * @return true if all descendants are writeable, false otherwise
- */
-function areDirectoryEntriesWriteable(aDir) {
-  let items = aDir.directoryEntries;
-  while (items.hasMoreElements()) {
-    let item = items.getNext().QueryInterface(Ci.nsIFile);
-    if (!item.isWritable()) {
-      LOG("areDirectoryEntriesWriteable - unable to write to " + item.path);
-      return false;
-    }
-    if (item.isDirectory() && !areDirectoryEntriesWriteable(item)) {
-      return false;
-    }
-  }
-  return true;
-}
-
-/**
- * OSX only function to determine if the user requires elevation to be able to
- * write to the application bundle.
- *
- * @return true if elevation is required, false otherwise
- */
-function getElevationRequired() {
-  if (AppConstants.platform != "macosx") {
-    return false;
-  }
-
-  try {
-    // Recursively check that the application bundle (and its descendants) can
-    // be written to.
-    LOG("getElevationRequired - recursively testing write access on " +
-        getInstallDirRoot().path);
-    if (!getInstallDirRoot().isWritable() ||
-        !areDirectoryEntriesWriteable(getInstallDirRoot())) {
-      LOG("getElevationRequired - unable to write to application bundle, " +
-          "elevation required");
-      return true;
-    }
-  } catch (ex) {
-    LOG("getElevationRequired - unable to write to application bundle, " +
-        "elevation required. Exception: " + ex);
-    return true;
-  }
-  LOG("getElevationRequired - able to write to application bundle, elevation " +
-      "not required");
-  return false;
-}
-
-/**
- * Determines whether or not an update can be applied. This is always true on
- * Windows when the service is used. Also, this is always true on OSX because we
- * offer users the option to perform an elevated update when necessary.
- *
- * @return true if an update can be applied, false otherwise
- */
 function getCanApplyUpdates() {
   let useService = false;
   if (shouldUseService()) {
     // No need to perform directory write checks, the maintenance service will
     // be able to write to all directories.
     LOG("getCanApplyUpdates - bypass the write checks because we'll use the service");
     useService = true;
   }
 
-  if (!useService && AppConstants.platform != "macosx") {
+  if (!useService) {
     try {
       let updateTestFile = getUpdateFile([FILE_PERMS_TEST]);
       LOG("getCanApplyUpdates - testing write access " + updateTestFile.path);
       testWriteAccess(updateTestFile, false);
-      if (AppConstants.platform == "win") {
+      if (AppConstants.platform == "macosx") {
+        // Check that the application bundle can be written to.
+        let appDirTestFile = getAppBaseDir();
+        appDirTestFile.append(FILE_PERMS_TEST);
+        LOG("getCanApplyUpdates - testing write access " + appDirTestFile.path);
+        if (appDirTestFile.exists()) {
+          appDirTestFile.remove(false);
+        }
+        appDirTestFile.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, FileUtils.PERMS_FILE);
+        appDirTestFile.remove(false);
+      } else if (AppConstants.platform == "win") {
         // Example windowsVersion:  Windows XP == 5.1
         let windowsVersion = Services.sysinfo.getProperty("version");
         LOG("getCanApplyUpdates - windowsVersion = " + windowsVersion);
 
-        /**
-         * For Vista, updates can be performed to a location requiring admin
-         * privileges by requesting elevation via the UAC prompt when launching
-         * updater.exe if the appDir is under the Program Files directory
-         * (e.g. C:\Program Files\) and UAC is turned on and  we can elevate
-         * (e.g. user has a split token).
-         *
-         * Note: this does note attempt to handle the case where UAC is turned on
-         * and the installation directory is in a restricted location that
-         * requires admin privileges to update other than Program Files.
-         */
+      /**
+       * For Vista, updates can be performed to a location requiring admin
+       * privileges by requesting elevation via the UAC prompt when launching
+       * updater.exe if the appDir is under the Program Files directory
+       * (e.g. C:\Program Files\) and UAC is turned on and  we can elevate
+       * (e.g. user has a split token).
+       *
+       * Note: this does note attempt to handle the case where UAC is turned on
+       * and the installation directory is in a restricted location that
+       * requires admin privileges to update other than Program Files.
+       */
         let userCanElevate = false;
 
         if (parseFloat(windowsVersion) >= 6) {
           try {
             // KEY_UPDROOT will fail and throw an exception if
             // appDir is not under the Program Files, so we rely on that
             let dir = Services.dirsvc.get(KEY_UPDROOT, Ci.nsIFile);
             // appDir is under Program Files, so check if the user can elevate
@@ -512,30 +438,19 @@ function getCanApplyUpdates() {
 /**
  * Whether or not the application can stage an update for the current session.
  * These checks are only performed once per session due to using a lazy getter.
  *
  * @return true if updates can be staged for this session.
  */
 XPCOMUtils.defineLazyGetter(this, "gCanStageUpdatesSession",
                             function aus_gCanStageUpdatesSession() {
-  if (getElevationRequired()) {
-    LOG("gCanStageUpdatesSession - unable to stage updates because elevation " +
-        "is required.");
-    return false;
-  }
-
   try {
-    let updateTestFile;
-    if (AppConstants.platform == "macosx") {
-      updateTestFile = getUpdateFile([FILE_PERMS_TEST]);
-    } else {
-      updateTestFile = getInstallDirRoot();
-      updateTestFile.append(FILE_PERMS_TEST);
-    }
+    let updateTestFile = getInstallDirRoot();
+    updateTestFile.append(FILE_PERMS_TEST);
     LOG("gCanStageUpdatesSession - testing write access " +
         updateTestFile.path);
     testWriteAccess(updateTestFile, true);
     if (AppConstants.platform != "macosx") {
       // On all platforms except Mac, we need to test the parent directory as
       // well, as we need to be able to move files in that directory during the
       // replacing step.
       updateTestFile = getInstallDirRoot().parent;
@@ -1288,54 +1203,26 @@ function handleUpdateFailure(update, err
     Cc["@mozilla.org/updates/update-prompt;1"].
       createInstance(Ci.nsIUpdatePrompt).
       showUpdateError(update);
     writeStatusFile(getUpdatesDir(), update.state = STATE_PENDING);
     return true;
   }
 
   if (update.errorCode == ELEVATION_CANCELED) {
+    writeStatusFile(getUpdatesDir(), update.state = STATE_PENDING);
     let cancelations = getPref("getIntPref", PREF_APP_UPDATE_CANCELATIONS, 0);
     cancelations++;
     Services.prefs.setIntPref(PREF_APP_UPDATE_CANCELATIONS, cancelations);
-    if (AppConstants.platform == "macosx") {
-      let osxCancelations = getPref("getIntPref",
-                                  PREF_APP_UPDATE_CANCELATIONS_OSX, 0);
-      osxCancelations++;
-      Services.prefs.setIntPref(PREF_APP_UPDATE_CANCELATIONS_OSX,
-                                osxCancelations);
-      let maxCancels = getPref("getIntPref",
-                               PREF_APP_UPDATE_MAX_OSX_CANCELATIONS,
-                               DEFAULT_MAX_OSX_CANCELATIONS);
-      if (osxCancelations >= DEFAULT_MAX_OSX_CANCELATIONS) {
-        cleanupActiveUpdate();
-      } else {
-        writeStatusFile(getUpdatesDir(),
-                        update.state = STATE_PENDING_ELEVATE);
-      }
-      update.statusText = gUpdateBundle.GetStringFromName("elevationFailure");
-      let oldType = update.selectedPatch ? update.selectedPatch.type
-                                         : "complete";
-      update.QueryInterface(Ci.nsIWritablePropertyBag);
-      update.setProperty("patchingFailed", oldType);
-      let prompter = Cc["@mozilla.org/updates/update-prompt;1"].
-                 createInstance(Ci.nsIUpdatePrompt);
-      prompter.showUpdateError(update);
-    } else {
-      writeStatusFile(getUpdatesDir(), update.state = STATE_PENDING);
-    }
     return true;
   }
 
   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CANCELATIONS)) {
     Services.prefs.clearUserPref(PREF_APP_UPDATE_CANCELATIONS);
   }
-  if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CANCELATIONS_OSX)) {
-    Services.prefs.clearUserPref(PREF_APP_UPDATE_CANCELATIONS_OSX);
-  }
 
   // Replace with Array.prototype.includes when it has stabilized.
   if (SERVICE_ERRORS.indexOf(update.errorCode) != -1) {
     var failCount = getPref("getIntPref",
                             PREF_APP_UPDATE_SERVICE_ERRORS, 0);
     var maxFail = getPref("getIntPref",
                           PREF_APP_UPDATE_SERVICE_MAX_ERRORS,
                           DEFAULT_SERVICE_MAX_ERRORS);
@@ -1413,43 +1300,40 @@ function pingStateAndStatusCodes(aUpdate
         stateCode = 2;
         break;
       case STATE_DOWNLOADING:
         stateCode = 3;
         break;
       case STATE_PENDING:
         stateCode = 4;
         break;
-      case STATE_PENDING_SERVICE:
+      case STATE_PENDING_SVC:
         stateCode = 5;
         break;
       case STATE_APPLYING:
         stateCode = 6;
         break;
       case STATE_APPLIED:
         stateCode = 7;
         break;
       case STATE_APPLIED_OS:
         stateCode = 8;
         break;
-      case STATE_APPLIED_SERVICE:
+      case STATE_APPLIED_SVC:
         stateCode = 9;
         break;
       case STATE_SUCCEEDED:
         stateCode = 10;
         break;
       case STATE_DOWNLOAD_FAILED:
         stateCode = 11;
         break;
       case STATE_FAILED:
         stateCode = 12;
         break;
-      case STATE_PENDING_ELEVATE:
-        stateCode = 13;
-        break;
       default:
         stateCode = 1;
     }
 
     if (parts.length > 1) {
       let statusErrorCode = INVALID_UPDATER_STATE_CODE;
       if (parts[0] == STATE_FAILED) {
         statusErrorCode = parseInt(parts[1]) || INVALID_UPDATER_STATUS_CODE;
@@ -1975,34 +1859,16 @@ UpdateService.prototype = {
    * @param   topic
    *          The notification name
    * @param   data
    *          Additional data
    */
   observe: function AUS_observe(subject, topic, data) {
     switch (topic) {
       case "post-update-processing":
-        let appInfoID1 = Cc["@mozilla.org/xre/app-info;1"]
-                           .getService(Ci.nsIXULAppInfo).ID;
-        if (appInfoID1 in APPID_TO_TOPIC) {
-          // Delay post-update processing to ensure that possible update
-          // dialogs are shown in front of the app window, if possible.
-          // See bug 311614.
-          Services.obs.addObserver(this, APPID_TO_TOPIC[appInfoID1], false);
-          break;
-        }
-        // intentional fallthrough
-      case "sessionstore-windows-restored":
-      case "mail-startup-done":
-      case "xul-window-visible":
-        let appInfoID2 = Cc["@mozilla.org/xre/app-info;1"]
-                           .getService(Ci.nsIXULAppInfo).ID;
-        if (appInfoID2 in APPID_TO_TOPIC) {
-          Services.obs.removeObserver(this, APPID_TO_TOPIC[appInfoID2]);
-        }
         // Clean up any extant updates
         this._postUpdateProcessing();
         break;
       case "network:offline-status-changed":
         this._offlineStatusChanged(data);
         break;
       case "nsPref:changed":
         if (data == PREF_APP_UPDATE_LOG) {
@@ -2114,18 +1980,17 @@ UpdateService.prototype = {
       //    applying, but has never finished.
       // In order to differentiate between these two states, we look at the
       // state field of the update object.  If it's "pending", then we know
       // that this is the first time we're hitting this case, so we switch
       // that state to "applying" and we just wait and hope for the best.
       // If it's "applying", we know that we've already been here once, so
       // we really want to start from a clean state.
       if (update &&
-          (update.state == STATE_PENDING ||
-           update.state == STATE_PENDING_SERVICE)) {
+          (update.state == STATE_PENDING || update.state == STATE_PENDING_SVC)) {
         LOG("UpdateService:_postUpdateProcessing - patch found in applying " +
             "state for the first time");
         update.state = STATE_APPLYING;
         um.saveUpdates();
       } else { // We get here even if we don't have an update object
         LOG("UpdateService:_postUpdateProcessing - patch found in applying " +
             "state for the second time");
         cleanupActiveUpdate();
@@ -2181,20 +2046,18 @@ UpdateService.prototype = {
 
       // Update the patch's metadata.
       um.activeUpdate = update;
       Services.prefs.setBoolPref(PREF_APP_UPDATE_POSTUPDATE, true);
       prompter.showUpdateInstalled();
 
       // Done with this update. Clean it up.
       cleanupActiveUpdate();
-    } else if (status == STATE_PENDING_ELEVATE) {
-      prompter.showUpdateElevationRequired();
-      return;
-    } else {
+    }
+    else {
       // If we hit an error, then the error code will be included in the status
       // string following a colon and a space. If we had an I/O error, then we
       // assume that the patch is not invalid, and we re-stage the patch so that
       // it can be attempted again the next time we restart. This will leave a
       // space at the beginning of the error code when there is a failure which
       // will be removed by using parseInt below. This prevents panic which has
       // occurred numerous times previously (see bug 569642 comment #9 for one
       // example) when testing releases due to forgetting to include the space.
@@ -2407,31 +2270,23 @@ UpdateService.prototype = {
     AUSTLMY.pingBoolPref("UPDATE_NOT_PREF_UPDATE_AUTO_" + this._pingSuffix,
                          PREF_APP_UPDATE_AUTO, true, true);
     // Histogram IDs:
     // UPDATE_NOT_PREF_UPDATE_STAGING_ENABLED_EXTERNAL
     // UPDATE_NOT_PREF_UPDATE_STAGING_ENABLED_NOTIFY
     AUSTLMY.pingBoolPref("UPDATE_NOT_PREF_UPDATE_STAGING_ENABLED_" +
                          this._pingSuffix,
                          PREF_APP_UPDATE_STAGING_ENABLED, true, true);
-    if (AppConstants.platform == "win" || AppConstants.platform == "macosx") {
+    if (AppConstants.platform == "win") {
       // Histogram IDs:
       // UPDATE_PREF_UPDATE_CANCELATIONS_EXTERNAL
       // UPDATE_PREF_UPDATE_CANCELATIONS_NOTIFY
       AUSTLMY.pingIntPref("UPDATE_PREF_UPDATE_CANCELATIONS_" + this._pingSuffix,
                           PREF_APP_UPDATE_CANCELATIONS, 0, 0);
     }
-    if (AppConstants.platform == "macosx") {
-      // Histogram IDs:
-      // UPDATE_PREF_UPDATE_CANCELATIONS_OSX_EXTERNAL
-      // UPDATE_PREF_UPDATE_CANCELATIONS_OSX_NOTIFY
-      AUSTLMY.pingIntPref("UPDATE_PREF_UPDATE_CANCELATIONS_OSX_" +
-                          this._pingSuffix,
-                          PREF_APP_UPDATE_CANCELATIONS_OSX, 0, 0);
-    }
     if (AppConstants.MOZ_MAINTENANCE_SERVICE) {
       // Histogram IDs:
       // UPDATE_NOT_PREF_UPDATE_SERVICE_ENABLED_EXTERNAL
       // UPDATE_NOT_PREF_UPDATE_SERVICE_ENABLED_NOTIFY
       AUSTLMY.pingBoolPref("UPDATE_NOT_PREF_UPDATE_SERVICE_ENABLED_" +
                            this._pingSuffix,
                            PREF_APP_UPDATE_SERVICE_ENABLED, true);
       // Histogram IDs:
@@ -2460,18 +2315,17 @@ UpdateService.prototype = {
     // If a download is in progress or the patch has been staged do nothing.
     if (this.isDownloading) {
       AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_IS_DOWNLOADING);
       return;
     }
 
     if (this._downloader && this._downloader.patchIsStaged) {
       let readState = readStatusFile(getUpdatesDir());
-      if (readState == STATE_PENDING || readState == STATE_PENDING_SVC ||
-          readState == STATE_PENDING_ELEVATE) {
+      if (readState == STATE_PENDING || readState == STATE_PENDING_SVC) {
         AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_IS_DOWNLOADED);
       } else {
         AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_IS_STAGED);
       }
       return;
     }
 
     let validUpdateURL = true;
@@ -2578,76 +2432,18 @@ UpdateService.prototype = {
         default:
           LOG("UpdateService:selectUpdate - skipping unknown update type: " +
               aUpdate.type);
           lastCheckCode = AUSTLMY.CHK_UPDATE_INVALID_TYPE;
           break;
       }
     });
 
-    let update = minorUpdate || majorUpdate;
-    if (AppConstants.platform == "macosx" && update) {
-      if (getElevationRequired()) {
-        let installAttemptVersion = getPref("getCharPref",
-                                            PREF_APP_UPDATE_ELEVATE_VERSION,
-                                            null);
-        if (vc.compare(installAttemptVersion, update.appVersion) != 0) {
-          Services.prefs.setCharPref(PREF_APP_UPDATE_ELEVATE_VERSION,
-                                     update.appVersion);
-          if (Services.prefs.prefHasUserValue(
-                PREF_APP_UPDATE_CANCELATIONS_OSX)) {
-            Services.prefs.clearUserPref(PREF_APP_UPDATE_CANCELATIONS_OSX);
-          }
-          if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) {
-            Services.prefs.clearUserPref(PREF_APP_UPDATE_ELEVATE_NEVER);
-          }
-        } else {
-          let numCancels = getPref("getIntPref",
-                                   PREF_APP_UPDATE_CANCELATIONS_OSX,
-                                   0);
-          let rejectedVersion = getPref("getCharPref",
-                                        PREF_APP_UPDATE_ELEVATE_NEVER, "");
-          let maxCancels = getPref("getIntPref",
-                                   PREF_APP_UPDATE_MAX_OSX_CANCELATIONS,
-                                   DEFAULT_MAX_OSX_CANCELATIONS);
-          if (numCancels >= maxCancels) {
-            LOG("UpdateService:selectUpdate - the user requires elevation to " +
-                "install this update, but the user has exceeded the max " +
-                "number of elevation attempts.");
-            update.elevationFailure = true;
-            AUSTLMY.pingCheckCode(
-              this._pingSuffix,
-              AUSTLMY.CHK_ELEVATION_DISABLED_FOR_VERSION);
-          } else if (vc.compare(rejectedVersion, update.appVersion) == 0) {
-            LOG("UpdateService:selectUpdate - the user requires elevation to " +
-                "install this update, but elevation is disabled for this " +
-                "version.");
-            update.elevationFailure = true;
-            AUSTLMY.pingCheckCode(this._pingSuffix,
-                                  AUSTLMY.CHK_ELEVATION_OPTOUT_FOR_VERSION);
-          } else {
-            LOG("UpdateService:selectUpdate - the user requires elevation to " +
-                "install the update.");
-          }
-        }
-      } else {
-        // Clear elevation-related prefs since they no longer apply (the user
-        // may have gained write access to the Firefox directory or an update
-        // was executed with a different profile).
-        if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_VERSION)) {
-          Services.prefs.clearUserPref(PREF_APP_UPDATE_ELEVATE_VERSION);
-        }
-        if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CANCELATIONS_OSX)) {
-          Services.prefs.clearUserPref(PREF_APP_UPDATE_CANCELATIONS_OSX);
-        }
-        if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) {
-          Services.prefs.clearUserPref(PREF_APP_UPDATE_ELEVATE_NEVER);
-        }
-      }
-    } else if (!update) {
+    var update = minorUpdate || majorUpdate;
+    if (!update) {
       AUSTLMY.pingCheckCode(this._pingSuffix, lastCheckCode);
     }
 
     return update;
   },
 
   /**
    * Determine which of the specified updates should be installed and begin the
@@ -2674,17 +2470,17 @@ UpdateService.prototype = {
     if (!updateEnabled) {
       AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_PREF_DISABLED);
       LOG("UpdateService:_selectAndInstallUpdate - not prompting because " +
           "update is disabled");
       return;
     }
 
     var update = this.selectUpdate(updates, updates.length);
-    if (!update || update.elevationFailure) {
+    if (!update) {
       return;
     }
 
     if (update.unsupported) {
       LOG("UpdateService:_selectAndInstallUpdate - update not supported for " +
           "this system");
       if (!getPref("getBoolPref", PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED, false)) {
         LOG("UpdateService:_selectAndInstallUpdate - notifying that the " +
@@ -2768,23 +2564,16 @@ UpdateService.prototype = {
    */
   get canCheckForUpdates() {
     return gCanCheckForUpdates && hasUpdateMutex();
   },
 
   /**
    * See nsIUpdateService.idl
    */
-  get elevationRequired() {
-    return getElevationRequired();
-  },
-
-  /**
-   * See nsIUpdateService.idl
-   */
   get canApplyUpdates() {
     return getCanApplyUpdates() && hasUpdateMutex();
   },
 
   /**
    * See nsIUpdateService.idl
    */
   get canStageUpdates() {
@@ -3218,19 +3007,18 @@ UpdateManager.prototype = {
 
     this._ensureUpdates();
     // Don't write updates that have a temporary state to the updates.xml file.
     if (this._updates) {
       let updates = this._updates.slice();
       for (let i = updates.length - 1; i >= 0; --i) {
         let state = updates[i].state;
         if (state == STATE_NONE || state == STATE_DOWNLOADING ||
-            state == STATE_APPLIED || state == STATE_APPLIED_SERVICE ||
-            state == STATE_PENDING || state == STATE_PENDING_SERVICE ||
-            state == STATE_PENDING_ELEVATE) {
+            state == STATE_APPLIED || state == STATE_APPLIED_SVC ||
+            state == STATE_PENDING || state == STATE_PENDING_SVC) {
           updates.splice(i, 1);
         }
       }
 
       this._writeUpdatesToXMLFile(updates.slice(0, 10),
                                   getUpdateFile([FILE_UPDATES_DB]));
     }
   },
@@ -3251,25 +3039,23 @@ UpdateManager.prototype = {
 
     if (update.state == STATE_FAILED && parts[1]) {
       updateSucceeded = false;
       if (!handleUpdateFailure(update, parts[1])) {
         handleFallbackToCompleteUpdate(update, true);
       }
     }
     if (update.state == STATE_APPLIED && shouldUseService()) {
-      writeStatusFile(getUpdatesDir(), update.state = STATE_APPLIED_SERVICE);
+      writeStatusFile(getUpdatesDir(), update.state = STATE_APPLIED_SVC);
     }
     var um = Cc["@mozilla.org/updates/update-manager;1"].
              getService(Ci.nsIUpdateManager);
     um.saveUpdates();
 
-    if (update.state != STATE_PENDING &&
-        update.state != STATE_PENDING_SERVICE &&
-        update.state != STATE_PENDING_ELEVATE) {
+    if (update.state != STATE_PENDING && update.state != STATE_PENDING_SVC) {
       // Destroy the updates directory, since we're done with it.
       // Make sure to not do this when the updater has fallen back to
       // non-staged updates.
       cleanUpUpdatesDir(updateSucceeded);
     }
 
     // Send an observer notification which the update wizard uses in
     // order to update its UI.
@@ -3294,62 +3080,26 @@ UpdateManager.prototype = {
     }
     // Only prompt when the UI isn't already open.
     let windowType = getPref("getCharPref", PREF_APP_UPDATE_ALTWINDOWTYPE, null);
     if (Services.wm.getMostRecentWindow(UPDATE_WINDOW_NAME) ||
         windowType && Services.wm.getMostRecentWindow(windowType)) {
       return;
     }
 
-    if (update.state == STATE_APPLIED ||
-        update.state == STATE_APPLIED_SERVICE ||
-        update.state == STATE_PENDING ||
-        update.state == STATE_PENDING_SERVICE ||
-        update.state == STATE_PENDING_ELEVATE) {
-      // Notify the user that an update has been staged and is ready for
-      // installation (i.e. that they should restart the application).
+    if (update.state == STATE_APPLIED || update.state == STATE_APPLIED_SVC ||
+        update.state == STATE_PENDING || update.state == STATE_PENDING_SVC) {
+        // Notify the user that an update has been staged and is ready for
+        // installation (i.e. that they should restart the application).
       let prompter = Cc["@mozilla.org/updates/update-prompt;1"].
                      createInstance(Ci.nsIUpdatePrompt);
       prompter.showUpdateDownloaded(update, true);
     }
   },
 
-  /**
-   * See nsIUpdateService.idl
-   */
-  elevationOptedIn: function UM_elevationOptedIn() {
-    // The user has been been made aware that the update requires elevation.
-    let update = this._activeUpdate;
-    if (!update) {
-      return;
-    }
-    let status = readStatusFile(getUpdatesDir());
-    let parts = status.split(":");
-    update.state = parts[0];
-    if (update.state == STATE_PENDING_ELEVATE) {
-      // Proceed with the pending update.
-      // Note: STATE_PENDING_ELEVATE stands for "pending user's approval to
-      // proceed with an elevated update". As long as we see this state, we will
-      // notify the user of the availability of an update that requires
-      // elevation. |elevationOptedIn| (this function) is called when the user
-      // gives us approval to proceed, so we want to switch to STATE_PENDING.
-      // The updater then detects whether or not elevation is required and
-      // displays the elevation prompt if necessary. This last step does not
-      // depend on the state in the status file.
-      writeStatusFile(getUpdatesDir(), STATE_PENDING);
-    }
-  },
-
-  /**
-   * See nsIUpdateService.idl
-   */
-  cleanupActiveUpdate: function UM_cleanupActiveUpdate() {
-    cleanupActiveUpdate();
-  },
-
   classID: Components.ID("{093C2356-4843-4C65-8709-D7DBCBBE7DFB}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdateManager, Ci.nsIObserver])
 };
 
 /**
  * Checker
  * Checks for new Updates
  * @constructor
@@ -3685,19 +3435,18 @@ Downloader.prototype = {
   /**
    * Whether or not a patch has been downloaded and staged for installation.
    */
   get patchIsStaged() {
     var readState = readStatusFile(getUpdatesDir());
     // Note that if we decide to download and apply new updates after another
     // update has been successfully applied in the background, we need to stop
     // checking for the APPLIED state here.
-    return readState == STATE_PENDING || readState == STATE_PENDING_SERVICE ||
-           readState == STATE_PENDING_ELEVATE ||
-           readState == STATE_APPLIED || readState == STATE_APPLIED_SERVICE;
+    return readState == STATE_PENDING || readState == STATE_PENDING_SVC ||
+           readState == STATE_APPLIED || readState == STATE_APPLIED_SVC;
   },
 
   /**
    * Verify the downloaded file.  We assume that the download is complete at
    * this point.
    */
   _verifyDownload: function Downloader__verifyDownload() {
     LOG("Downloader:_verifyDownload called");
@@ -3813,18 +3562,17 @@ Downloader.prototype = {
         if (state == STATE_PENDING || state == STATE_APPLYING) {
           LOG("Downloader:_selectPatch - resuming interrupted apply");
           return selectedPatch;
         }
         if (state == STATE_APPLIED) {
           LOG("Downloader:_selectPatch - already downloaded and staged");
           return null;
         }
-      } else if (state == STATE_PENDING || state == STATE_PENDING_SERVICE ||
-                 state == STATE_PENDING_ELEVATE) {
+      } else if (state == STATE_PENDING || state == STATE_PENDING_SVC) {
         LOG("Downloader:_selectPatch - already downloaded and staged");
         return null;
       }
 
       if (update && selectedPatch.type == "complete") {
         // This is a pretty fatal error.  Just bail.
         LOG("Downloader:_selectPatch - failed to apply complete patch!");
         writeStatusFile(updateDir, STATE_NONE);
@@ -3939,38 +3687,30 @@ Downloader.prototype = {
           patchFile = updateDir.clone();
           patchFile.append(FILE_UPDATE_ARCHIVE);
         }
         if (patchFile.exists()) {
           LOG("Downloader:downloadUpdate - resuming with patchFile " + patchFile.path);
           if (patchFile.fileSize == this._patch.size) {
             LOG("Downloader:downloadUpdate - patchFile appears to be fully downloaded");
             // Bump the status along so that we don't try to redownload again.
-            if (getElevationRequired()) {
-              status = STATE_PENDING_ELEVATE;
-            } else {
-              status = STATE_PENDING;
-            }
+            status = STATE_PENDING;
           }
         } else {
           LOG("Downloader:downloadUpdate - patchFile " + patchFile.path +
               " doesn't exist - performing full download");
           // The patchfile doesn't exist, we might as well treat this like
           // a new download.
           patchFile = null;
         }
         if (patchFile && status != STATE_DOWNLOADING) {
           // It looks like the patch was downloaded, but got interrupted while it
           // was being verified or applied. So we'll fake the downloading portion.
 
-          if (getElevationRequired()) {
-            writeStatusFile(updateDir, STATE_PENDING_ELEVATE);
-          } else {
-            writeStatusFile(updateDir, STATE_PENDING);
-          }
+          writeStatusFile(updateDir, STATE_PENDING);
 
           // Since the code expects the onStopRequest callback to happen
           // asynchronously (And you have to call AUS_addDownloadListener
           // after calling AUS_downloadUpdate) we need to defer this.
 
           this._downloadTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
           this._downloadTimer.initWithCallback(function() {
             this._downloadTimer = null;
@@ -4189,23 +3929,17 @@ Downloader.prototype = {
                                DEFAULT_UPDATE_RETRY_TIMEOUT);
     var maxFail = getPref("getIntPref", PREF_APP_UPDATE_SOCKET_ERRORS,
                           DEFAULT_SOCKET_MAX_ERRORS);
     LOG("Downloader:onStopRequest - status: " + status + ", " +
         "current fail: " + this.updateService._consecutiveSocketErrors + ", " +
         "max fail: " + maxFail + ", " + "retryTimeout: " + retryTimeout);
     if (Components.isSuccessCode(status)) {
       if (this._verifyDownload()) {
-        if (shouldUseService()) {
-          state = STATE_PENDING_SERVICE;
-        } else if (getElevationRequired()) {
-          state = STATE_PENDING_ELEVATE;
-        } else {
-          state = STATE_PENDING;
-        }
+        state = shouldUseService() ? STATE_PENDING_SVC : STATE_PENDING;
         if (this.background) {
           shouldShowPrompt = !getCanStageUpdates();
         }
         AUSTLMY.pingDownloadCode(this.isCompleteUpdate, AUSTLMY.DWNLD_SUCCESS);
 
         // Tell the updater.exe we're ready to apply.
         writeStatusFile(getUpdatesDir(), state);
         writeVersionFile(getUpdatesDir(), this._update.appVersion);
@@ -4358,18 +4092,17 @@ Downloader.prototype = {
 
         // Prevent leaking the update object (bug 454964).
         this._update = null;
       }
       // A complete download has been initiated or the failure was handled.
       return;
     }
 
-    if (state == STATE_PENDING || state == STATE_PENDING_SERVICE ||
-        state == STATE_PENDING_ELEVATE) {
+    if (state == STATE_PENDING || state == STATE_PENDING_SVC) {
       if (getCanStageUpdates()) {
         LOG("Downloader:onStopRequest - attempting to stage update: " +
             this._update.name);
 
         // Initiate the update in the background
         try {
           Cc["@mozilla.org/updates/update-processor;1"].
             createInstance(Ci.nsIUpdateProcessor).
@@ -4456,19 +4189,18 @@ UpdatePrompt.prototype = {
                  null, null);
   },
 
   /**
    * See nsIUpdateService.idl
    */
   showUpdateAvailable: function UP_showUpdateAvailable(update) {
     if (getPref("getBoolPref", PREF_APP_UPDATE_SILENT, false) ||
-        this._getUpdateWindow() || this._getAltUpdateWindow()) {
+        this._getUpdateWindow() || this._getAltUpdateWindow())
       return;
-    }
 
     this._showUnobtrusiveUI(null, URI_UPDATE_PROMPT_DIALOG, null,
                            UPDATE_WINDOW_NAME, "updatesavailable", update);
   },
 
   /**
    * See nsIUpdateService.idl
    */
@@ -4492,25 +4224,33 @@ UpdatePrompt.prototype = {
   },
 
   /**
    * See nsIUpdateService.idl
    */
   showUpdateInstalled: function UP_showUpdateInstalled() {
     if (getPref("getBoolPref", PREF_APP_UPDATE_SILENT, false) ||
         !getPref("getBoolPref", PREF_APP_UPDATE_SHOW_INSTALLED_UI, false) ||
-        this._getUpdateWindow()) {
+        this._getUpdateWindow())
       return;
+
+    var page = "installed";
+    var win = this._getUpdateWindow();
+    if (win) {
+      if (page && "setCurrentPage" in win)
+        win.setCurrentPage(page);
+      win.focus();
     }
-
-    let openFeatures = "chrome,centerscreen,dialog=no,resizable=no,titlebar,toolbar=no";
-    let arg = Cc["@mozilla.org/supports-string;1"].
-              createInstance(Ci.nsISupportsString);
-    arg.data = "installed";
-    Services.ww.openWindow(null, URI_UPDATE_PROMPT_DIALOG, null, openFeatures, arg);
+    else {
+      var openFeatures = "chrome,centerscreen,dialog=no,resizable=no,titlebar,toolbar=no";
+      var arg = Cc["@mozilla.org/supports-string;1"].
+                createInstance(Ci.nsISupportsString);
+      arg.data = page;
+      Services.ww.openWindow(null, URI_UPDATE_PROMPT_DIALOG, null, openFeatures, arg);
+    }
   },
 
   /**
    * See nsIUpdateService.idl
    */
   showUpdateError: function UP_showUpdateError(update) {
     if (getPref("getBoolPref", PREF_APP_UPDATE_SILENT, false) ||
         this._getAltUpdateWindow())
@@ -4549,31 +4289,16 @@ UpdatePrompt.prototype = {
    * See nsIUpdateService.idl
    */
   showUpdateHistory: function UP_showUpdateHistory(parent) {
     this._showUI(parent, URI_UPDATE_HISTORY_DIALOG, "modal,dialog=yes",
                  "Update:History", null, null);
   },
 
   /**
-   * See nsIUpdateService.idl
-   */
-  showUpdateElevationRequired: function UP_showUpdateElevationRequired() {
-    if (getPref("getBoolPref", PREF_APP_UPDATE_SILENT, false) ||
-        this._getAltUpdateWindow()) {
-      return;
-    }
-
-    let um = Cc["@mozilla.org/updates/update-manager;1"].
-             getService(Ci.nsIUpdateManager);
-    this._showUI(null, URI_UPDATE_PROMPT_DIALOG, null,
-                 UPDATE_WINDOW_NAME, "finishedBackground", um.activeUpdate);
-  },
-
-  /**
    * Returns the update window if present.
    */
   _getUpdateWindow: function UP__getUpdateWindow() {
     return Services.wm.getMostRecentWindow(UPDATE_WINDOW_NAME);
   },
 
   /**
    * Returns an alternative update window if present. When a window with this
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ -1577,17 +1577,17 @@ function runUpdate(aExpectedExitValue, a
     updateBin = updater.clone();
   } else {
     updater.copyToFollowingLinks(updatesDir, updater.leafName);
     updateBin = updatesDir.clone();
     updateBin.append(updater.leafName);
     if (updateBin.leafName == "updater.app") {
       updateBin.append("Contents");
       updateBin.append("MacOS");
-      updateBin.append("org.mozilla.updater");
+      updateBin.append("updater");
     }
   }
   Assert.ok(updateBin.exists(), MSG_SHOULD_EXIST);
 
   let applyToDir = getApplyDirFile(null, true);
   let applyToDirPath = applyToDir.path;
 
   let stageDir = getStageDirFile(null, true);
deleted file mode 100644
--- a/toolkit/mozapps/update/updater/Launchd.plist
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-  <key>Label</key>
-  <string>org.mozilla.updater</string>
-  <key>RunAtLoad</key>
-  <true/>
-</dict>
-</plist>
--- a/toolkit/mozapps/update/updater/Makefile.in
+++ b/toolkit/mozapps/update/updater/Makefile.in
@@ -11,19 +11,16 @@ MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-export::
-	sed -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/bin/Info.plist
 libs::
 	$(NSINSTALL) -D $(DIST)/bin/updater.app
-	rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app
-	rsync -a -C $(DIST)/bin/Info.plist $(DIST)/bin/updater.app/Contents
+	rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app 
 	sed -e 's/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
 	  iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/updater.app/Contents/Resources/English.lproj/InfoPlist.strings
 	$(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS
-	$(NSINSTALL) $(DIST)/bin/org.mozilla.updater $(DIST)/bin/updater.app/Contents/MacOS
+	$(NSINSTALL) $(DIST)/bin/updater $(DIST)/bin/updater.app/Contents/MacOS
 endif
--- a/toolkit/mozapps/update/updater/launchchild_osx.mm
+++ b/toolkit/mozapps/update/updater/launchchild_osx.mm
@@ -5,82 +5,114 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <Cocoa/Cocoa.h>
 #include <CoreServices/CoreServices.h>
 #include <crt_externs.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <spawn.h>
-#include <SystemConfiguration/SystemConfiguration.h>
 #include "readstrings.h"
 
-class MacAutoreleasePool {
-public:
-  MacAutoreleasePool()
-  {
-    mPool = [[NSAutoreleasePool alloc] init];
-  }
-  ~MacAutoreleasePool()
-  {
-    [mPool release];
+// Prefer the currently running architecture (this is the same as the
+// architecture that launched the updater) and fallback to CPU_TYPE_ANY if it
+// is no longer available after the update.
+static cpu_type_t pref_cpu_types[2] = {
+#if defined(__i386__)
+                                 CPU_TYPE_X86,
+#elif defined(__x86_64__)
+                                 CPU_TYPE_X86_64,
+#elif defined(__ppc__)
+                                 CPU_TYPE_POWERPC,
+#endif
+                                 CPU_TYPE_ANY };
+
+void LaunchChild(int argc, char **argv)
+{
+  // Initialize spawn attributes.
+  posix_spawnattr_t spawnattr;
+  if (posix_spawnattr_init(&spawnattr) != 0) {
+    printf("Failed to init posix spawn attribute.");
+    return;
   }
 
-private:
-  NSAutoreleasePool* mPool;
-};
-
-void LaunchChild(int argc, const char** argv)
-{
-  MacAutoreleasePool pool;
+  // Set spawn attributes.
+  size_t attr_count = 2;
+  size_t attr_ocount = 0;
+  if (posix_spawnattr_setbinpref_np(&spawnattr, attr_count, pref_cpu_types, &attr_ocount) != 0 ||
+      attr_ocount != attr_count) {
+    printf("Failed to set binary preference on posix spawn attribute.");
+    posix_spawnattr_destroy(&spawnattr);
+    return;
+  }
 
-  @try {
-    NSString* launchPath = [NSString stringWithUTF8String:argv[0]];
-    NSMutableArray* arguments = [NSMutableArray arrayWithCapacity:argc];
-    for (int i = 1; i < argc; i++) {
-      [arguments addObject:[NSString stringWithUTF8String:argv[i]]];
-    }
-    [NSTask launchedTaskWithLaunchPath:launchPath
-                             arguments:arguments];
-  } @catch (NSException* e) {
-    // Ignore any exception.
+  // "posix_spawnp" uses null termination for arguments rather than a count.
+  // Note that we are not duplicating the argument strings themselves.
+  char** argv_copy = (char**)malloc((argc + 1) * sizeof(char*));
+  if (!argv_copy) {
+    printf("Failed to allocate memory for arguments.");
+    posix_spawnattr_destroy(&spawnattr);
+    return;
+  }
+  for (int i = 0; i < argc; i++) {
+    argv_copy[i] = argv[i];
+  }
+  argv_copy[argc] = NULL;
+
+  // Pass along our environment.
+  char** envp = NULL;
+  char*** cocoaEnvironment = _NSGetEnviron();
+  if (cocoaEnvironment) {
+    envp = *cocoaEnvironment;
+  }
+
+  int result = posix_spawnp(NULL, argv_copy[0], NULL, &spawnattr, argv_copy, envp);
+
+  free(argv_copy);
+  posix_spawnattr_destroy(&spawnattr);
+
+  if (result != 0) {
+    printf("Process spawn failed with code %d!", result);
   }
 }
 
 void
 LaunchMacPostProcess(const char* aAppBundle)
 {
-  MacAutoreleasePool pool;
-
   // Launch helper to perform post processing for the update; this is the Mac
   // analogue of LaunchWinPostProcess (PostUpdateWin).
+  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
   NSString* iniPath = [NSString stringWithUTF8String:aAppBundle];
   iniPath =
     [iniPath stringByAppendingPathComponent:@"Contents/Resources/updater.ini"];
 
   NSFileManager* fileManager = [NSFileManager defaultManager];
   if (![fileManager fileExistsAtPath:iniPath]) {
     // the file does not exist; there is nothing to run
+    [pool release];
     return;
   }
 
   int readResult;
   char values[2][MAX_TEXT_LEN];
   readResult = ReadStrings([iniPath UTF8String],
                            "ExeRelPath\0ExeArg\0",
                            2,
                            values,
                            "PostUpdateMac");
   if (readResult) {
+    [pool release];
     return;
   }
 
   NSString *exeRelPath = [NSString stringWithUTF8String:values[0]];
   NSString *exeArg = [NSString stringWithUTF8String:values[1]];
   if (!exeArg || !exeRelPath) {
+    [pool release];
     return;
   }
 
   NSString* exeFullPath = [NSString stringWithUTF8String:aAppBundle];
   exeFullPath = [exeFullPath stringByAppendingPathComponent:exeRelPath];
 
   char optVals[1][MAX_TEXT_LEN];
   readResult = ReadStrings([iniPath UTF8String],
@@ -96,272 +128,11 @@ LaunchMacPostProcess(const char* aAppBun
   if (!readResult) {
     NSString *exeAsync = [NSString stringWithUTF8String:optVals[0]];
     if ([exeAsync isEqualToString:@"false"]) {
       [task waitUntilExit];
     }
   }
   // ignore the return value of the task, there's nothing we can do with it
   [task release];
-}
 
-void CleanupElevatedMacUpdate(bool aFailureOccurred)
-{
-  MacAutoreleasePool pool;
-
-  id updateServer = nil;
-  @try {
-    updateServer = (id)[NSConnection
-      rootProxyForConnectionWithRegisteredName:
-        @"org.mozilla.updater.server"
-      host:nil
-      usingNameServer:[NSSocketPortNameServer sharedInstance]];
-    if (aFailureOccurred &&
-        updateServer &&
-        [updateServer respondsToSelector:@selector(abort)]) {
-      [updateServer performSelector:@selector(abort)];
-    }
-    else if (updateServer &&
-             [updateServer respondsToSelector:@selector(shutdown)]) {
-      [updateServer performSelector:@selector(shutdown)];
-    }
-  } @catch (NSException* e) {
-    // Ignore exceptions.
-  }
-  NSFileManager* manager = [NSFileManager defaultManager];
-  [manager removeItemAtPath:@"/Library/PrivilegedHelperTools/org.mozilla.updater"
-                      error:nil];
-  [manager removeItemAtPath:@"/Library/LaunchDaemons/org.mozilla.updater.plist"
-                      error:nil];
-  const char* launchctlArgs[] = {"/bin/launchctl",
-                                 "remove",
-                                 "org.mozilla.updater"};
-  // The following call will terminate the current process due to the "remove"
-  // argument in launchctlArgs.
-  LaunchChild(3, launchctlArgs);
-}
-
-// Note: Caller is responsible for freeing argv.
-bool ObtainUpdaterArguments(int* argc, char*** argv)
-{
-  MacAutoreleasePool pool;
-
-  id updateServer = nil;
-  @try {
-    BOOL isConnected = NO;
-    int currTry = 0;
-    const int numRetries = 10; // Number of IPC connection retries before
-                               // giving up.
-    while (!isConnected) {
-      updateServer = (id)[NSConnection
-        rootProxyForConnectionWithRegisteredName:
-          @"org.mozilla.updater.server"
-        host:nil
-        usingNameServer:[NSSocketPortNameServer sharedInstance]];
-      if (!updateServer ||
-          ![updateServer respondsToSelector:@selector(getArguments)] ||
-          ![updateServer respondsToSelector:@selector(shutdown)]) {
-        NSLog(@"Server doesn't exist or doesn't provide correct selectors.");
-        if (currTry >= numRetries) {
-          // We've exceeded the number of permissible connection retry attempts.
-          // Let's try our best and clean up.
-          CleanupElevatedMacUpdate(true);
-          return false; // Won't actually get here due to
-                        // CleanupElevatedMacUpdate.
-        }
-        sleep(1); // Wait 1 second.
-        currTry++;
-      } else {
-        isConnected = YES;
-      }
-    }
-    NSArray* updaterArguments =
-      [updateServer performSelector:@selector(getArguments)];
-    *argc = [updaterArguments count];
-    char** tempArgv = (char**)malloc(sizeof(char*) * (*argc));
-    for (int i = 0; i < *argc; i++) {
-      int argLen = [[updaterArguments objectAtIndex:i] length] + 1;
-      tempArgv[i] = (char*)malloc(argLen);
-      strncpy(tempArgv[i], [[updaterArguments objectAtIndex:i] UTF8String],
-              argLen);
-    }
-    *argv = tempArgv;
-  } @catch (NSException* e) {
-    // Let's try our best and clean up.
-    CleanupElevatedMacUpdate(true);
-    return false; // Won't actually get here due to CleanupElevatedMacUpdate.
-  }
-  return true;
-}
-
-/**
- * The ElevatedUpdateServer is launched from a non-elevated updater process.
- * It allows an elevated updater process (usually a privileged helper tool) to
- * connect to it and receive all the necessary arguments to complete a
- * successful update.
- */
-@interface ElevatedUpdateServer : NSObject
-{
-  NSArray* mUpdaterArguments;
-  BOOL mShouldKeepRunning;
-  BOOL mAborted;
-}
-- (id)initWithArgs:(NSArray*)args;
-- (BOOL)runServer;
-- (NSArray*)getArguments;
-- (void)abort;
-- (BOOL)wasAborted;
-- (void)shutdown;
-- (BOOL)shouldKeepRunning;
-@end
-
-@implementation ElevatedUpdateServer
-
-- (id)initWithArgs:(NSArray*)args
-{
-  self = [super init];
-  if (!self) {
-    return nil;
-  }
-  mUpdaterArguments = args;
-  mShouldKeepRunning = YES;
-  mAborted = NO;
-  return self;
+  [pool release];
 }
-
-- (BOOL)runServer
-{
-  NSPort* serverPort = [NSSocketPort port];
-  NSConnection* server = [NSConnection connectionWithReceivePort:serverPort
-                                                        sendPort:serverPort];
-  [server setRootObject:self];
-  if ([server registerName:@"org.mozilla.updater.server"
-            withNameServer:[NSSocketPortNameServer sharedInstance]] == NO) {
-    NSLog(@"Unable to register as DirectoryServer.");
-    NSLog(@"Is another copy running?");
-    return NO;
-  }
-
-  while ([self shouldKeepRunning] &&
-         [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
-                                  beforeDate:[NSDate distantFuture]]);
-  return ![self wasAborted];
-}
-
-- (NSArray*)getArguments
-{
-  return mUpdaterArguments;
-}
-
-- (void)abort
-{
-  mAborted = YES;
-  [self shutdown];
-}
-
-- (BOOL)wasAborted
-{
-  return mAborted;
-}
-
-- (void)shutdown
-{
-  mShouldKeepRunning = NO;
-}
-
-- (BOOL)shouldKeepRunning
-{
-  return mShouldKeepRunning;
-}
-
-@end
-
-bool ServeElevatedUpdate(int argc, const char** argv)
-{
-  MacAutoreleasePool pool;
-
-  NSMutableArray* updaterArguments = [NSMutableArray arrayWithCapacity:argc];
-  for (int i = 0; i < argc; i++) {
-    [updaterArguments addObject:[NSString stringWithUTF8String:argv[i]]];
-  }
-
-  ElevatedUpdateServer* updater =
-    [[ElevatedUpdateServer alloc] initWithArgs:[updaterArguments copy]];
-  bool didSucceed = [updater runServer];
-
-  [updater release];
-  return didSucceed;
-}
-
-bool IsOwnedByGroupAdmin(const char* aAppBundle)
-{
-  MacAutoreleasePool pool;
-
-  NSString* appDir = [NSString stringWithUTF8String:aAppBundle];
-  NSFileManager* fileManager = [NSFileManager defaultManager];
-
-  NSDictionary* attributes = [fileManager attributesOfItemAtPath:appDir
-                                                           error:nil];
-  bool isOwnedByAdmin = false;
-  if (attributes &&
-      [[attributes valueForKey:NSFileGroupOwnerAccountID] intValue] == 80) {
-    isOwnedByAdmin = true;
-  }
-  return isOwnedByAdmin;
-}
-
-void SetGroupOwnershipAndPermissions(const char* aAppBundle)
-{
-  MacAutoreleasePool pool;
-
-  NSString* appDir = [NSString stringWithUTF8String:aAppBundle];
-  NSFileManager* fileManager = [NSFileManager defaultManager];
-  NSError* error = nil;
-  NSArray* paths =
-    [fileManager subpathsOfDirectoryAtPath:appDir
-                                     error:&error];
-  if (error) {
-    return;
-  }
-
-  // Set group ownership of Firefox.app to 80 ("admin") and permissions to
-  // 0775.
-  if (![fileManager setAttributes:@{ NSFileGroupOwnerAccountID: @(80),
-                                     NSFilePosixPermissions: @(0775) }
-                     ofItemAtPath:appDir
-                            error:&error] || error) {
-    return;
-  }
-
-  NSArray* permKeys = [NSArray arrayWithObjects:NSFileGroupOwnerAccountID,
-                                                NSFilePosixPermissions,
-                                                nil];
-  // For all descendants of Firefox.app, set group ownership to 80 ("admin") and
-  // ensure write permission for the group.
-  for (NSString* currPath in paths) {
-    NSString* child = [appDir stringByAppendingPathComponent:currPath];
-    NSDictionary* oldAttributes =
-      [fileManager attributesOfItemAtPath:child
-                                    error:&error];
-    if (error) {
-      return;
-    }
-    // Skip symlinks, since they could be pointing to files outside of the .app
-    // bundle.
-    if ([oldAttributes fileType] == NSFileTypeSymbolicLink) {
-      continue;
-    }
-    NSNumber* oldPerms =
-      (NSNumber*)[oldAttributes valueForKey:NSFilePosixPermissions];
-    NSArray* permObjects =
-      [NSArray arrayWithObjects:
-        [NSNumber numberWithUnsignedLong:80],
-        [NSNumber numberWithUnsignedLong:[oldPerms shortValue] | 020],
-        nil];
-    NSDictionary* attributes = [NSDictionary dictionaryWithObjects:permObjects
-                                                           forKeys:permKeys];
-    if (![fileManager setAttributes:attributes
-                       ofItemAtPath:child
-                              error:&error] || error) {
-      return;
-    }
-  }
-}
new file mode 100644
--- /dev/null
+++ b/toolkit/mozapps/update/updater/macbuild/Contents/Info.plist
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>updater</string>
+	<key>CFBundleIconFile</key>
+	<string>updater.icns</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.mozilla.updater</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>NSMainNibFile</key>
+	<string>MainMenu</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>10.5</string>
+	<key>LSMinimumSystemVersionByArchitecture</key>
+	<dict>
+		<key>i386</key>
+		<string>10.5.0</string>
+		<key>x86_64</key>
+		<string>10.6.0</string>
+	</dict>
+</dict>
+</plist>
deleted file mode 100644
--- a/toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>org.mozilla.updater</string>
-	<key>CFBundleIconFile</key>
-	<string>updater.icns</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.mozilla.updater</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>NSMainNibFile</key>
-	<string>MainMenu</string>
-	<key>NSPrincipalClass</key>
-	<string>NSApplication</string>
-	<key>LSMinimumSystemVersion</key>
-	<string>10.5</string>
-	<key>LSMinimumSystemVersionByArchitecture</key>
-	<dict>
-		<key>i386</key>
-		<string>10.5.0</string>
-		<key>x86_64</key>
-		<string>10.6.0</string>
-	</dict>
-	<key>SMAuthorizedClients</key>
-	<array>
-		<string>identifier "%MOZ_MACBUNDLE_ID%" and ((anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9]) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "43AQ936H96"))</string>
-	</array>
-</dict>
-</plist>
--- a/toolkit/mozapps/update/updater/moz.build
+++ b/toolkit/mozapps/update/updater/moz.build
@@ -1,35 +1,23 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
-    Program('org.mozilla.updater')
-else:
-    Program('updater')
+Program('updater')
 
 updater_rel_path = ''
 include('updater-common.build')
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['updater-xpcshell']
 
 CXXFLAGS += CONFIG['MOZ_BZ2_CFLAGS']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
-    LDFLAGS += ['-sectcreate',
-                '__TEXT',
-                '__info_plist',
-                TOPOBJDIR + '/dist/bin/Info.plist',
-                '-sectcreate',
-                '__TEXT',
-                '__launchd_plist',
-                SRCDIR + '/Launchd.plist']
 
 GENERATED_FILES = [
     'primaryCert.h',
     'secondaryCert.h',
     'xpcshellCert.h',
 ]
 
 primary_cert = GENERATED_FILES['primaryCert.h']
--- a/toolkit/mozapps/update/updater/progressui.h
+++ b/toolkit/mozapps/update/updater/progressui.h
@@ -19,19 +19,16 @@
 
 // Called to perform any initialization of the widget toolkit
 int InitProgressUI(int *argc, NS_tchar ***argv);
 
 #if defined(XP_WIN)
   // Called on the main thread at startup
   int ShowProgressUI(bool indeterminate = false, bool initUIStrings = true);
   int InitProgressUIStrings();
-#elif defined(XP_MACOSX)
-  // Called on the main thread at startup
-  int ShowProgressUI(bool indeterminate = false);
 #else
   // Called on the main thread at startup
   int ShowProgressUI();
 #endif
 // May be called from any thread
 void QuitProgressUI();
 
 // May be called from any thread: progress is a number between 0 and 100
--- a/toolkit/mozapps/update/updater/progressui_osx.mm
+++ b/toolkit/mozapps/update/updater/progressui_osx.mm
@@ -9,34 +9,33 @@
 #include <unistd.h>
 #include "progressui.h"
 #include "readstrings.h"
 #include "errors.h"
 
 #define TIMER_INTERVAL 0.2
 
 static float sProgressVal;  // between 0 and 100
-static BOOL sQuit = NO;
-static BOOL sIndeterminate = NO;
+static BOOL sQuit = FALSE;
 static StringTable sLabels;
 static const char *sUpdatePath;
 
 @interface UpdaterUI : NSObject
 {
   IBOutlet NSProgressIndicator *progressBar;
   IBOutlet NSTextField *progressTextField;
 }
 @end
 
 @implementation UpdaterUI
 
 -(void)awakeFromNib
 {
   NSWindow *w = [progressBar window];
-
+  
   [w setTitle:[NSString stringWithUTF8String:sLabels.title]];
   [progressTextField setStringValue:[NSString stringWithUTF8String:sLabels.info]];
 
   NSRect origTextFrame = [progressTextField frame];
   [progressTextField sizeToFit];
 
   int widthAdjust = progressTextField.frame.size.width - origTextFrame.size.width;
 
@@ -44,17 +43,17 @@ static const char *sUpdatePath;
     NSRect f;
     f.size.width  = w.frame.size.width + widthAdjust;
     f.size.height = w.frame.size.height;
     [w setFrame:f display:YES];
   }
 
   [w center];
 
-  [progressBar setIndeterminate:sIndeterminate];
+  [progressBar setIndeterminate:NO];
   [progressBar setDoubleValue:0.0];
 
   [[NSTimer scheduledTimerWithTimeInterval:TIMER_INTERVAL target:self
                                   selector:@selector(updateProgressUI:)
                                   userInfo:nil repeats:YES] retain];
 
   // Make sure we are on top initially
   [NSApp activateIgnoringOtherApps:YES];
@@ -94,50 +93,49 @@ int
 InitProgressUI(int *pargc, char ***pargv)
 {
   sUpdatePath = (*pargv)[1];
   
   return 0;
 }
 
 int
-ShowProgressUI(bool indeterminate)
+ShowProgressUI()
 {
   // Only show the Progress UI if the process is taking a significant amount of
   // time where a significant amount of time is defined as .5 seconds after
   // ShowProgressUI is called sProgress is less than 70.
   usleep(500000);
-
+  
   if (sQuit || sProgressVal > 70.0f)
     return 0;
 
   char path[PATH_MAX];
   snprintf(path, sizeof(path), "%s/updater.ini", sUpdatePath);
   if (ReadStrings(path, &sLabels) != OK)
     return -1;
 
   // Continue the update without showing the Progress UI if any of the supplied
   // strings are larger than MAX_TEXT_LEN (Bug 628829).
   if (!(strlen(sLabels.title) < MAX_TEXT_LEN - 1 &&
         strlen(sLabels.info) < MAX_TEXT_LEN - 1))
     return -1;
-
-  sIndeterminate = indeterminate;
+  
   [NSApplication sharedApplication];
   [NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
   [NSApp run];
 
   return 0;
 }
 
 // Called on a background thread
 void
 QuitProgressUI()
 {
-  sQuit = YES;
+  sQuit = TRUE;
 }
 
 // Called on a background thread
 void
 UpdateProgressUI(float progress)
 {
   sProgressVal = progress;  // 32-bit writes are atomic
 }
--- a/toolkit/mozapps/update/updater/updater-common.build
+++ b/toolkit/mozapps/update/updater/updater-common.build
@@ -77,23 +77,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
     have_progressui = 1
     srcs += [
         'launchchild_osx.mm',
         'progressui_osx.mm',
     ]
     OS_LIBS += [
         '-framework Cocoa',
         '-framework Security',
-        '-framework SystemConfiguration',
-    ]
-    UNIFIED_SOURCES += [
-        '/toolkit/xre/updaterfileutils_osx.mm',
-    ]
-    LOCAL_INCLUDES += [
-        '/toolkit/xre',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     have_progressui = 1
     srcs += [
         'automounter_gonk.cpp',
         'progressui_gonk.cpp',
     ]
     DISABLE_STL_WRAPPING = True
--- a/toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in
+++ b/toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in
@@ -25,17 +25,17 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 	$(NSINSTALL) -D $(XPCSHELLTESTROOT)/data/updater-xpcshell.app
 	rsync -a -C --exclude '*.in' $(srcdir)/../macbuild/Contents $(XPCSHELLTESTROOT)/data/updater-xpcshell.app
 	sed -e 's/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/' $(srcdir)/../macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
 	  iconv -f UTF-8 -t UTF-16 > $(XPCSHELLTESTROOT)/data/updater-xpcshell.app/Contents/Resources/English.lproj/InfoPlist.strings
 	$(NSINSTALL) -D $(XPCSHELLTESTROOT)/data/updater-xpcshell.app/Contents/MacOS/updater-xpcshell
 	$(NSINSTALL) updater-xpcshell $(XPCSHELLTESTROOT)/data/updater-xpcshell.app/Contents/MacOS
 	rm -Rf $(XPCSHELLTESTROOT)/data/updater.app
 	mv $(XPCSHELLTESTROOT)/data/updater-xpcshell.app $(XPCSHELLTESTROOT)/data/updater.app
-	mv $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/updater-xpcshell $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/org.mozilla.updater
+	mv $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/updater-xpcshell $(XPCSHELLTESTROOT)/data/updater.app/Contents/MacOS/updater
 
 	# Copy for mochitest chrome tests
 	rsync -a -C $(XPCSHELLTESTROOT)/data/updater.app $(MOCHITESTROOT)/data/
 else
 	cp $(PROGRAM) $(XPCSHELLTESTROOT)/data/updater$(BIN_SUFFIX)
 	cp $(PROGRAM) $(MOCHITESTROOT)/data/updater$(BIN_SUFFIX)
 endif
 endif # COMPILE_ENVIRONMENT
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -48,19 +48,16 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <limits.h>
 #include <errno.h>
 #include <algorithm>
 
 #include "updatelogging.h"
-#ifdef XP_MACOSX
-#include "updaterfileutils_osx.h"
-#endif // XP_MACOSX
 
 #include "mozilla/Compiler.h"
 #include "mozilla/Types.h"
 
 // Amount of the progress bar to use in each of the 3 update stages,
 // should total 100.0.
 #define PROGRESS_PREPARE_SIZE 20.0f
 #define PROGRESS_EXECUTE_SIZE 75.0f
@@ -71,29 +68,18 @@
 // Use a large value for debug builds since the xpcshell tests take a long time.
 #define PARENT_WAIT 30000
 #else
 #define PARENT_WAIT 10000
 #endif
 
 #if defined(XP_MACOSX)
 // These functions are defined in launchchild_osx.mm
-void CleanupElevatedMacUpdate(bool aFailureOccurred);
-bool IsOwnedByGroupAdmin(const char* aAppBundle);
-bool IsRecursivelyWritable(const char* aPath);
-void LaunchChild(int argc, const char** argv);
+void LaunchChild(int argc, char **argv);
 void LaunchMacPostProcess(const char* aAppBundle);
-bool ObtainUpdaterArguments(int* argc, char*** argv);
-bool ServeElevatedUpdate(int argc, const char** argv);
-void SetGroupOwnershipAndPermissions(const char* aAppBundle);
-struct UpdateServerThreadArgs
-{
-  int argc;
-  const NS_tchar** argv;
-};
 #endif
 
 #ifndef _O_BINARY
 # define _O_BINARY 0
 #endif
 
 #ifndef NULL
 # define NULL (0)
@@ -2004,17 +1990,17 @@ LaunchCallbackApp(const NS_tchar *workin
   // passes the working directory as an --environ: command line argument.
   if (NS_tchdir(workingDir) != 0) {
     LOG(("Warning: chdir failed"));
   }
 
 #if defined(USE_EXECV)
   execv(argv[0], argv);
 #elif defined(XP_MACOSX)
-  LaunchChild(argc, (const char**)argv);
+  LaunchChild(argc, argv);
 #elif defined(XP_WIN)
   // Do not allow the callback to run when running an update through the
   // service as session 0.  The unelevated updater.exe will do the launching.
   if (!usingService) {
     WinLaunchChild(argv[0], argc, argv, nullptr);
   }
 #else
 # warning "Need implementaton of LaunchCallbackApp"
@@ -2527,104 +2513,18 @@ UpdateThreadFunc(void *param)
     }
     WriteStatusFile(rv);
   }
 
   LOG(("calling QuitProgressUI"));
   QuitProgressUI();
 }
 
-#ifdef XP_MACOSX
-static void
-ServeElevatedUpdateThreadFunc(void* param)
-{
-  UpdateServerThreadArgs* threadArgs = (UpdateServerThreadArgs*)param;
-  gSucceeded = ServeElevatedUpdate(threadArgs->argc, threadArgs->argv);
-  if (!gSucceeded) {
-    WriteStatusFile(ELEVATION_CANCELED);
-  }
-  QuitProgressUI();
-}
-
-void freeArguments(int argc, char** argv)
-{
-  for (int i = 0; i < argc; i++) {
-    free(argv[i]);
-  }
-  free(argv);
-}
-#endif
-
-int LaunchCallbackAndPostProcessApps(int argc, NS_tchar** argv,
-                                     int callbackIndex
-#if defined(XP_WIN)
-                                     , const WCHAR* elevatedLockFilePath
-                                     , HANDLE updateLockFileHandle
-#endif /* XP_WIN */
-#ifdef XP_MACOSX
-                                     , bool isElevated
-#endif /* XP_MACOSX */
-                                     )
-{
-  if (argc > callbackIndex) {
-#if defined(XP_WIN)
-    if (gSucceeded) {
-      if (!LaunchWinPostProcess(gInstallDirPath, gPatchDirPath)) {
-        fprintf(stderr, "The post update process was not launched");
-      }
-
-      // The service update will only be executed if it is already installed.
-      // For first time installs of the service, the install will happen from
-      // the PostUpdate process. We do the service update process here
-      // because it's possible we are updating with updater.exe without the
-      // service if the service failed to apply the update. We want to update
-      // the service to a newer version in that case. If we are not running
-      // through the service, then MOZ_USING_SERVICE will not exist.
-      if (!sUsingService) {
-        StartServiceUpdate(gInstallDirPath);
-      }
-    }
-    EXIT_WHEN_ELEVATED(elevatedLockFilePath, updateLockFileHandle, 0);
-#elif XP_MACOSX
-    if (!isElevated) {
-      if (gSucceeded) {
-        LaunchMacPostProcess(gInstallDirPath);
-      }
-#endif
-
-    LaunchCallbackApp(argv[5],
-                      argc - callbackIndex,
-                      argv + callbackIndex,
-                      sUsingService);
-#ifdef XP_MACOSX
-    } // if (!isElevated)
-#endif /* XP_MACOSX */
-  }
-  return 0;
-}
-
 int NS_main(int argc, NS_tchar **argv)
 {
-  // The callback is the remaining arguments starting at callbackIndex.
-  // The argument specified by callbackIndex is the callback executable and the
-  // argument prior to callbackIndex is the working directory.
-  const int callbackIndex = 6;
-
-#ifdef XP_MACOSX
-  bool isElevated =
-    strstr(argv[0], "/Library/PrivilegedHelperTools/org.mozilla.updater") != 0;
-  if (isElevated) {
-    if (!ObtainUpdaterArguments(&argc, &argv)) {
-      // Won't actually get here because ObtainUpdaterArguments will terminate
-      // the current process on failure.
-      return 1;
-    }
-  }
-#endif
-
 #if defined(MOZ_WIDGET_GONK)
   if (EnvHasValue("LD_PRELOAD")) {
     // If the updater is launched with LD_PRELOAD set, then we wind up
     // preloading libmozglue.so. Under some circumstances, this can cause
     // the remount of /system to fail when going from rw to ro, so if we
     // detect LD_PRELOAD we unsetenv it and relaunch ourselves without it.
     // This will cause the offending preloaded library to be closed.
     //
@@ -2647,16 +2547,50 @@ int NS_main(int argc, NS_tchar **argv)
   if (NSS_NoDB_Init(NULL) != SECSuccess) {
    PRErrorCode error = PR_GetError();
    fprintf(stderr, "Could not initialize NSS: %s (%d)",
            PR_ErrorToName(error), (int) error);
     _exit(1);
   }
 #endif
 
+  InitProgressUI(&argc, &argv);
+
+  // To process an update the updater command line must at a minimum have the
+  // directory path containing the updater.mar file to process as the first
+  // argument, the install directory as the second argument, and the directory
+  // to apply the update to as the third argument. When the updater is launched
+  // by another process the PID of the parent process should be provided in the
+  // optional fourth argument and the updater will wait on the parent process to
+  // exit if the value is non-zero and the process is present. This is necessary
+  // due to not being able to update files that are in use on Windows. The
+  // optional fifth argument is the callback's working directory and the
+  // optional sixth argument is the callback path. The callback is the
+  // application to launch after updating and it will be launched when these
+  // arguments are provided whether the update was successful or not. All
+  // remaining arguments are optional and are passed to the callback when it is
+  // launched.
+  if (argc < 4) {
+    fprintf(stderr, "Usage: updater patch-dir install-dir apply-to-dir [wait-pid [callback-working-dir callback-path args...]]\n");
+    return 1;
+  }
+
+  // The directory containing the update information.
+  gPatchDirPath = argv[1];
+  // The directory we're going to update to.
+  // We copy this string because we need to remove trailing slashes.  The C++
+  // standard says that it's always safe to write to strings pointed to by argv
+  // elements, but I don't necessarily believe it.
+  NS_tstrncpy(gInstallDirPath, argv[2], MAXPATHLEN);
+  gInstallDirPath[MAXPATHLEN - 1] = NS_T('\0');
+  NS_tchar *slash = NS_tstrrchr(gInstallDirPath, NS_SLASH);
+  if (slash && !slash[1]) {
+    *slash = NS_T('\0');
+  }
+
 #ifdef XP_WIN
   bool useService = false;
   bool testOnlyFallbackKeyExists = false;
   bool noServiceFallback = EnvHasValue("MOZ_NO_SERVICE_FALLBACK");
   putenv(const_cast<char*>("MOZ_NO_SERVICE_FALLBACK="));
 
   // We never want the service to be used unless we build with
   // the maintenance service.
@@ -2705,81 +2639,16 @@ int NS_main(int argc, NS_tchar **argv)
       sStagedUpdate = true;
     } else if (NS_tstrstr(argv[4], NS_T("/replace"))) {
       // We're processing a request to replace the application with a staged
       // update.
       sReplaceRequest = true;
     }
   }
 
-  // The directory containing the update information.
-  gPatchDirPath = argv[1];
-
-#ifdef XP_MACOSX
-  if (!isElevated) {
-    InitProgressUI(&argc, &argv);
-    if (!IsRecursivelyWritable(argv[2])) {
-      // If the app directory isn't recursively writeable, an elevated update is
-      // required.
-      UpdateServerThreadArgs threadArgs;
-      threadArgs.argc = argc;
-      threadArgs.argv = const_cast<const NS_tchar**>(argv);
-
-      Thread t1;
-      if (t1.Run(ServeElevatedUpdateThreadFunc, &threadArgs) == 0) {
-        // Show an indeterminate progress bar while an elevated update is in
-        // progress.
-        ShowProgressUI(true);
-      }
-      t1.Join();
-
-      LaunchCallbackAndPostProcessApps(argc, argv, callbackIndex, false);
-      return gSucceeded ? 0 : 1;
-    }
-  }
-#elif
-  InitProgressUI(&argc, &argv);
-#endif
-
-  // To process an update the updater command line must at a minimum have the
-  // directory path containing the updater.mar file to process as the first
-  // argument, the install directory as the second argument, and the directory
-  // to apply the update to as the third argument. When the updater is launched
-  // by another process the PID of the parent process should be provided in the
-  // optional fourth argument and the updater will wait on the parent process to
-  // exit if the value is non-zero and the process is present. This is necessary
-  // due to not being able to update files that are in use on Windows. The
-  // optional fifth argument is the callback's working directory and the
-  // optional sixth argument is the callback path. The callback is the
-  // application to launch after updating and it will be launched when these
-  // arguments are provided whether the update was successful or not. All
-  // remaining arguments are optional and are passed to the callback when it is
-  // launched.
-  if (argc < 4) {
-    fprintf(stderr, "Usage: updater patch-dir install-dir apply-to-dir [wait-pid [callback-working-dir callback-path args...]]\n");
-#ifdef XP_MACOSX
-    if (isElevated) {
-      freeArguments(argc, argv);
-      CleanupElevatedMacUpdate(true);
-    }
-#endif
-    return 1;
-  }
-
-  // The directory we're going to update to.
-  // We copy this string because we need to remove trailing slashes.  The C++
-  // standard says that it's always safe to write to strings pointed to by argv
-  // elements, but I don't necessarily believe it.
-  NS_tstrncpy(gInstallDirPath, argv[2], MAXPATHLEN);
-  gInstallDirPath[MAXPATHLEN - 1] = NS_T('\0');
-  NS_tchar *slash = NS_tstrrchr(gInstallDirPath, NS_SLASH);
-  if (slash && !slash[1]) {
-    *slash = NS_T('\0');
-  }
-
   // The directory we're going to update to.
   // We copy this string because we need to remove trailing slashes.  The C++
   // standard says that it's always safe to write to strings pointed to by argv
   // elements, but I don't necessarily believe it.
   NS_tstrncpy(gWorkingDirPath, argv[3], MAXPATHLEN);
   gWorkingDirPath[MAXPATHLEN - 1] = NS_T('\0');
   slash = NS_tstrrchr(gWorkingDirPath, NS_SLASH);
   if (slash && !slash[1]) {
@@ -2809,22 +2678,16 @@ int NS_main(int argc, NS_tchar **argv)
 
     LogInitAppend(logDir, NS_T("last-update.log"), NS_T("update.log"));
   } else {
     LogInit(gPatchDirPath, NS_T("update.log"));
   }
 
   if (!WriteStatusFile("applying")) {
     LOG(("failed setting status to 'applying'"));
-#ifdef XP_MACOSX
-    if (isElevated) {
-      freeArguments(argc, argv);
-      CleanupElevatedMacUpdate(true);
-    }
-#endif
     return 1;
   }
 
   if (sStagedUpdate) {
     LOG(("Performing a staged update"));
   } else if (sReplaceRequest) {
     LOG(("Performing a replace request"));
   }
@@ -2910,16 +2773,21 @@ int NS_main(int argc, NS_tchar **argv)
     // so that it's not locked.
     NS_tchar sysDir[MAX_PATH + 1] = { L'\0' };
     if (GetSystemDirectoryW(sysDir, MAX_PATH + 1)) {
       NS_tchdir(sysDir);
     }
 #endif
   }
 
+  // The callback is the remaining arguments starting at callbackIndex.
+  // The argument specified by callbackIndex is the callback executable and the
+  // argument prior to callbackIndex is the working directory.
+  const int callbackIndex = 6;
+
 #if defined(XP_WIN)
 #ifdef MOZ_MAINTENANCE_SERVICE
   sUsingService = EnvHasValue("MOZ_USING_SERVICE");
   putenv(const_cast<char*>("MOZ_USING_SERVICE="));
 #endif
   // lastFallbackError keeps track of the last error for the service not being
   // used, in case of an error when fallback is not enabled we write the
   // error to the update.status file.
@@ -3245,32 +3113,20 @@ int NS_main(int argc, NS_tchar **argv)
     // Change current directory to the directory where we need to apply the update.
     if (NS_tchdir(gWorkingDirPath) != 0) {
       // Try to create the destination directory if it doesn't exist
       int rv = NS_tmkdir(gWorkingDirPath, 0755);
       if (rv == OK && errno != EEXIST) {
         // Try changing the current directory again
         if (NS_tchdir(gWorkingDirPath) != 0) {
           // OK, time to give up!
-#ifdef XP_MACOSX
-          if (isElevated) {
-            freeArguments(argc, argv);
-            CleanupElevatedMacUpdate(true);
-          }
-#endif
           return 1;
         }
       } else {
         // Failed to create the directory, bail out
-#ifdef XP_MACOSX
-        if (isElevated) {
-          freeArguments(argc, argv);
-          CleanupElevatedMacUpdate(true);
-        }
-#endif
         return 1;
       }
     }
   }
 
 #ifdef XP_WIN
   // For replace requests, we don't need to do any real updates, so this is not
   // necessary.
@@ -3473,27 +3329,22 @@ int NS_main(int argc, NS_tchar **argv)
     // will be deleted after the update is finished or on OS reboot using
     // MoveFileEx if it contains files that are in use.
     if (NS_taccess(DELETE_DIR, F_OK)) {
       NS_tmkdir(DELETE_DIR, 0755);
     }
   }
 #endif /* XP_WIN */
 
-  // Run update process on a background thread. ShowProgressUI may return
+  // Run update process on a background thread.  ShowProgressUI may return
   // before QuitProgressUI has been called, so wait for UpdateThreadFunc to
-  // terminate. Avoid showing the progress UI when staging an update, or if this
-  // is an elevated process on OSX.
+  // terminate.  Avoid showing the progress UI when staging an update.
   Thread t;
   if (t.Run(UpdateThreadFunc, nullptr) == 0) {
-    if (!sStagedUpdate && !sReplaceRequest
-#ifdef XP_MACOSX
-        && !isElevated
-#endif
-       ) {
+    if (!sStagedUpdate && !sReplaceRequest) {
       ShowProgressUI();
     }
   }
   t.Join();
 
 #ifdef XP_WIN
   if (argc > callbackIndex && !sReplaceRequest) {
     if (callbackFile != INVALID_HANDLE_VALUE) {
@@ -3562,42 +3413,53 @@ int NS_main(int argc, NS_tchar **argv)
         rv = rename_file(oldDistDir, newDistDir, true);
         if (rv) {
           LOG(("Moving old distribution directory to new location failed - " \
                "err: %d", rv));
         }
       }
     }
   }
-
-  if (isElevated) {
-    SetGroupOwnershipAndPermissions(gInstallDirPath);
-    freeArguments(argc, argv);
-    CleanupElevatedMacUpdate(false);
-  } else if (IsOwnedByGroupAdmin(gInstallDirPath)) {
-    // If the group ownership of the Firefox .app bundle was set to the "admin"
-    // group during a previous elevated update, we need to ensure that all files
-    // in the bundle have group ownership of "admin" as well as write permission
-    // for the group to not break updates in the future.
-    SetGroupOwnershipAndPermissions(gInstallDirPath);
-  }
 #endif /* XP_MACOSX */
 
   LogFinish();
 
-  int retVal = LaunchCallbackAndPostProcessApps(argc, argv, callbackIndex
-#ifdef XP_WIN
-                                                , elevatedLockFilePath
-                                                , updateLockFileHandle
-#elif XP_MACOSX
-                                                , isElevated
-#endif
-                                               );
-
-  return retVal ? retVal : (gSucceeded ? 0 : 1);
+  if (argc > callbackIndex) {
+#if defined(XP_WIN)
+    if (gSucceeded) {
+      if (!LaunchWinPostProcess(gInstallDirPath, gPatchDirPath)) {
+        fprintf(stderr, "The post update process was not launched");
+      }
+
+      // The service update will only be executed if it is already installed.
+      // For first time installs of the service, the install will happen from
+      // the PostUpdate process. We do the service update process here
+      // because it's possible we are updating with updater.exe without the
+      // service if the service failed to apply the update. We want to update
+      // the service to a newer version in that case. If we are not running
+      // through the service, then MOZ_USING_SERVICE will not exist.
+      if (!sUsingService) {
+        StartServiceUpdate(gInstallDirPath);
+      }
+    }
+    EXIT_WHEN_ELEVATED(elevatedLockFilePath, updateLockFileHandle, 0);
+#endif /* XP_WIN */
+#ifdef XP_MACOSX
+    if (gSucceeded) {
+      LaunchMacPostProcess(gInstallDirPath);
+    }
+#endif /* XP_MACOSX */
+
+    LaunchCallbackApp(argv[5],
+                      argc - callbackIndex,
+                      argv + callbackIndex,
+                      sUsingService);
+  }
+
+  return gSucceeded ? 0 : 1;
 }
 
 class ActionList
 {
 public:
   ActionList() : mFirst(nullptr), mLast(nullptr), mCount(0) { }
   ~ActionList();
 
--- a/toolkit/xre/MacLaunchHelper.h
+++ b/toolkit/xre/MacLaunchHelper.h
@@ -8,13 +8,11 @@
 
 #include <stdint.h>
 
 #include <unistd.h>
 
 extern "C" {
   void LaunchChildMac(int aArgc, char** aArgv, uint32_t aRestartType = 0,
                       pid_t *pid = 0);
-  bool LaunchElevatedUpdate(int argc, char** argv, uint32_t aRestartType = 0,
-                            pid_t* pid = 0);
 }
 
 #endif
--- a/toolkit/xre/MacLaunchHelper.mm
+++ b/toolkit/xre/MacLaunchHelper.mm
@@ -1,26 +1,22 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MacLaunchHelper.h"
 
-#include "MacAutoreleasePool.h"
+#include "nsMemory.h"
+#include "nsIAppStartup.h"
 #include "mozilla/UniquePtr.h"
-#include "nsIAppStartup.h"
-#include "nsMemory.h"
 
-#include <Cocoa/Cocoa.h>
+#include <stdio.h>
+#include <spawn.h>
 #include <crt_externs.h>
-#include <ServiceManagement/ServiceManagement.h>
-#include <Security/Authorization.h>
-#include <spawn.h>
-#include <stdio.h>
 
 using namespace mozilla;
 
 namespace {
 cpu_type_t pref_cpu_types[2] = {
 #if defined(__i386__)
                                  CPU_TYPE_X86,
 #elif defined(__x86_64__)
@@ -87,91 +83,8 @@ void LaunchChildMac(int aArgc, char** aA
   int result = posix_spawnp(pid, argv_copy[0], NULL, &spawnattr, argv_copy.get(), envp);
 
   posix_spawnattr_destroy(&spawnattr);
 
   if (result != 0) {
     printf("Process spawn failed with code %d!", result);
   }
 }
-
-BOOL InstallPrivilegedHelper()
-{
-  AuthorizationRef authRef = NULL;
-  OSStatus status = AuthorizationCreate(NULL,
-                                        kAuthorizationEmptyEnvironment,
-                                        kAuthorizationFlagDefaults |
-                                        kAuthorizationFlagInteractionAllowed,
-                                        &authRef);
-  if (status != errAuthorizationSuccess) {
-    // AuthorizationCreate really shouldn't fail.
-    NSLog(@"AuthorizationCreate failed! NSOSStatusErrorDomain / %d",
-          (int)status);
-    return NO;
-  }
-
-  BOOL result = NO;
-  AuthorizationItem authItem = { kSMRightBlessPrivilegedHelper, 0, NULL, 0 };
-  AuthorizationRights authRights = { 1, &authItem };
-  AuthorizationFlags flags = kAuthorizationFlagDefaults |
-                             kAuthorizationFlagInteractionAllowed |
-                             kAuthorizationFlagPreAuthorize |
-                             kAuthorizationFlagExtendRights;
-
-  // Obtain the right to install our privileged helper tool.
-  status = AuthorizationCopyRights(authRef,
-                                   &authRights,
-                                   kAuthorizationEmptyEnvironment,
-                                   flags,
-                                   NULL);
-  if (status != errAuthorizationSuccess) {
-    NSLog(@"AuthorizationCopyRights failed! NSOSStatusErrorDomain / %d",
-          (int)status);
-  } else {
-    CFErrorRef cfError;
-    // This does all the work of verifying the helper tool against the
-    // application and vice-versa. Once verification has passed, the embedded
-    // launchd.plist is extracted and placed in /Library/LaunchDaemons and then
-    // loaded. The executable is placed in /Library/PrivilegedHelperTools.
-    result = (BOOL)SMJobBless(kSMDomainSystemLaunchd,
-                              (CFStringRef)@"org.mozilla.updater",
-                              authRef,
-                              &cfError);
-    if (!result) {
-      NSLog(@"Unable to install helper!");
-      CFRelease(cfError);
-    }
-  }
-
-  return result;
-}
-
-void AbortElevatedUpdate()
-{
-  mozilla::MacAutoreleasePool pool;
-  id updateServer = nil;
-  @try {
-    updateServer = (id)[NSConnection
-      rootProxyForConnectionWithRegisteredName:
-        @"org.mozilla.updater.server"
-      host:nil
-      usingNameServer:[NSSocketPortNameServer sharedInstance]];
-    if (updateServer &&
-        [updateServer respondsToSelector:@selector(abort)]) {
-      [updateServer performSelector:@selector(abort)];
-    } else {
-      NSLog(@"Unable to clean up updater.");
-    }
-  } @catch (NSException* e) {
-    // Ignore exceptions.
-  }
-}
-
-bool LaunchElevatedUpdate(int argc, char** argv, uint32_t aRestartType,
-                          pid_t* pid)
-{
-  LaunchChildMac(argc, argv, aRestartType, pid);
-  bool didSucceed = InstallPrivilegedHelper();
-  if (!didSucceed) {
-    AbortElevatedUpdate();
-  }
-  return didSucceed;
-}
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -27,22 +27,23 @@ if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     UNIFIED_SOURCES += [
         'nsNativeAppSupportWin.cpp',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     EXPORTS += ['MacQuirks.h']
     UNIFIED_SOURCES += [
+        'nsCommandLineServiceMac.cpp',
+    ]
+    UNIFIED_SOURCES += [
         'MacApplicationDelegate.mm',
         'MacAutoreleasePool.mm',
         'MacLaunchHelper.mm',
-        'nsCommandLineServiceMac.cpp',
         'nsNativeAppSupportCocoa.mm',
-        'updaterfileutils_osx.mm',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
     UNIFIED_SOURCES += [
         'nsNativeAppSupportDefault.cpp',
         'UIKitDirProvider.mm',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
     EXPORTS += ['nsQAppInstance.h']
--- a/toolkit/xre/nsUpdateDriver.cpp
+++ b/toolkit/xre/nsUpdateDriver.cpp
@@ -26,17 +26,16 @@
 #include "mozilla/Preferences.h"
 #include "nsPrintfCString.h"
 #include "mozilla/DebugOnly.h"
 
 #ifdef XP_MACOSX
 #include "nsILocalFileMac.h"
 #include "nsCommandLineServiceMac.h"
 #include "MacLaunchHelper.h"
-#include "updaterfileutils_osx.h"
 #endif
 
 #if defined(XP_WIN)
 # include <direct.h>
 # include <process.h>
 # include <windows.h>
 # include <shlwapi.h>
 # include "nsWindowsHelpers.h"
@@ -79,18 +78,16 @@ GetUpdateLog()
   if (!sUpdateLog)
     sUpdateLog = PR_NewLogModule("updatedriver");
   return sUpdateLog;
 }
 #define LOG(args) MOZ_LOG(GetUpdateLog(), mozilla::LogLevel::Debug, args)
 
 #ifdef XP_WIN
 #define UPDATER_BIN "updater.exe"
-#elif XP_MACOSX
-#define UPDATER_BIN "org.mozilla.updater"
 #else
 #define UPDATER_BIN "updater"
 #endif
 #define UPDATER_INI "updater.ini"
 #ifdef XP_MACOSX
 #define UPDATER_APP "updater.app"
 #endif
 #if defined(XP_UNIX) && !defined(XP_MACOSX)
@@ -249,19 +246,18 @@ GetStatusFileContents(nsIFile *statusFil
 
   return (n >= 0);
 }
 
 typedef enum {
   eNoUpdateAction,
   ePendingUpdate,
   ePendingService,
-  ePendingElevate,
   eAppliedUpdate,
-  eAppliedService,
+  eAppliedService
 } UpdateStatus;
 
 /**
  * Returns a value indicating what needs to be done in order to handle an update.
  *
  * @param dir the directory in which we should look for an update.status file.
  * @param statusFile the update.status file found in the directory.
  *
@@ -270,22 +266,18 @@ typedef enum {
 static UpdateStatus
 GetUpdateStatus(nsIFile* dir, nsCOMPtr<nsIFile> &statusFile)
 {
   if (GetStatusFile(dir, statusFile)) {
     char buf[32];
     if (GetStatusFileContents(statusFile, buf)) {
       const char kPending[] = "pending";
       const char kPendingService[] = "pending-service";
-      const char kPendingElevate[] = "pending-elevate";
       const char kApplied[] = "applied";
       const char kAppliedService[] = "applied-service";
-      if (!strncmp(buf, kPendingElevate, sizeof(kPendingElevate) - 1)) {
-        return ePendingElevate;
-      }
       if (!strncmp(buf, kPendingService, sizeof(kPendingService) - 1)) {
         return ePendingService;
       }
       if (!strncmp(buf, kPending, sizeof(kPending) - 1)) {
         return ePendingUpdate;
       }
       if (!strncmp(buf, kAppliedService, sizeof(kAppliedService) - 1)) {
         return eAppliedService;
@@ -955,31 +947,23 @@ ApplyUpdate(nsIFile *greDir, nsIFile *up
     return;
   }
 
   if (restart) {
     // We are going to process an update so we should exit now
     _exit(0);
   }
 #elif defined(XP_MACOSX)
-  CommandLineServiceMac::SetupMacCommandLine(argc, argv, restart);
-  // We need to detect whether elevation is required for this update. This can
-  // occur when an admin user installs the application, but another admin
-  // user attempts to update (see bug 394984).
-  if (restart && !IsRecursivelyWritable(installDirPath.get())) {
-    if (!LaunchElevatedUpdate(argc, argv, 0, outpid)) {
-      LOG(("Failed to launch elevated update!"));
-      exit(1);
-    }
+  CommandLineServiceMac::SetupMacCommandLine(argc, argv, true);
+  // LaunchChildMac uses posix_spawnp and prefers the current
+  // architecture when launching. It doesn't require a
+  // null-terminated string but it doesn't matter if we pass one.
+  LaunchChildMac(argc, argv, 0, outpid);
+  if (restart) {
     exit(0);
-  } else {
-    LaunchChildMac(argc, argv, 0, outpid);
-    if (restart) {
-      exit(0);
-    }
   }
 #else
   *outpid = PR_CreateProcess(updaterPath.get(), argv, nullptr, nullptr);
   if (restart) {
     exit(0);
   }
 #endif
 }
@@ -1034,29 +1018,16 @@ ProcessUpdates(nsIFile *greDir, nsIFile 
       restart = false;
       pid = &dummyPID;
     }
   }
 
   nsCOMPtr<nsIFile> statusFile;
   UpdateStatus status = GetUpdateStatus(updatesDir, statusFile);
   switch (status) {
-  case ePendingElevate: {
-    if (NS_IsMainThread()) {
-      // Only do this if we're called from the main thread.
-      nsCOMPtr<nsIUpdatePrompt> up =
-        do_GetService("@mozilla.org/updates/update-prompt;1");
-      if (up) {
-        up->ShowUpdateElevationRequired();
-      }
-      break;
-    }
-    // Intentional fallthrough to ePendingUpdate and ePendingService.
-    MOZ_FALLTHROUGH;
-  }
   case ePendingUpdate:
   case ePendingService: {
     nsCOMPtr<nsIFile> versionFile;
     // Remove the update if the update application version file doesn't exist
     // or if the update's application version is less than the current
     // application version.
     if (!GetVersionFile(updatesDir, versionFile) ||
         IsOlderVersion(versionFile, appVersion)) {
deleted file mode 100644
--- a/toolkit/xre/updaterfileutils_osx.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef updaterfileutils_osx_h_
-#define updaterfileutils_osx_h_
-
-extern "C" {
-  bool IsRecursivelyWritable(const char* aPath);
-}
-
-#endif
\ No newline at end of file
deleted file mode 100644
--- a/toolkit/xre/updaterfileutils_osx.mm
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "updaterfileutils_osx.h"
-
-#include <Cocoa/Cocoa.h>
-
-bool IsRecursivelyWritable(const char* aPath)
-{
-  NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-
-  NSString* rootPath = [NSString stringWithUTF8String:aPath];
-  NSFileManager* fileManager = [NSFileManager defaultManager];
-  NSError* error = nil;
-  NSArray* subPaths =
-    [fileManager subpathsOfDirectoryAtPath:rootPath
-                                     error:&error];
-  NSMutableArray* paths =
-    [NSMutableArray arrayWithCapacity:[subPaths count] + 1];
-  [paths addObject:@""];
-  [paths addObjectsFromArray:subPaths];
-
-  if (error) {
-    [pool drain];
-    return false;
-  }
-
-  for (NSString* currPath in paths) {
-    NSString* child = [rootPath stringByAppendingPathComponent:currPath];
-
-    NSDictionary* attributes =
-      [fileManager attributesOfItemAtPath:child
-                                    error:&error];
-    if (error) {
-      [pool drain];
-      return false;
-    }
-
-    // Don't check for writability of files pointed to by symlinks, as they may
-    // not be descendants of the root path.
-    if ([attributes fileType] != NSFileTypeSymbolicLink &&
-        [fileManager isWritableFileAtPath:child] == NO) {
-      [pool drain];
-      return false;
-    }
-  }
-
-  [pool drain];
-  return true;
-}