Bug 1159698 - Opt-out dialog has a button for "disable", but actually the addon is removed;r=philipp
authorMakeMyDay <makemyday@gmx-topmail.de>
Wed, 06 May 2015 21:04:25 +0200
changeset 22586 099ffdaa0416f9cbe1cd53de5f6772483307a4f9
parent 22585 91c14cfc78bcc51c20b9f2c3a652195dc3e72e09
child 22587 88068e33345b17083b020427570020380fdb5cd3
push id1420
push usermbanner@mozilla.com
push dateMon, 29 Jun 2015 20:47:24 +0000
treeherdercomm-beta@b3db00bb24e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs1159698
Bug 1159698 - Opt-out dialog has a button for "disable", but actually the addon is removed;r=philipp
calendar/lightning/content/messenger-overlay-sidebar.js
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -209,31 +209,20 @@ function ltnIntegrationNotification() {
                     document.getElementById("messagepanebox");
 
     let appBrand = cal.calGetString("brand", "brandShortName", null, "branding");
     let ltnBrand = ltnGetString("lightning", "brandShortName");
     let label = ltnGetString("lightning", "integrationLabel", [appBrand, ltnBrand]);
 
     // call backs for doing/undoing Lightning removal
     let cbRemoveLightning = function (aAddon) {
-        try {
-            aAddon.uninstall();
-        } catch (e) {
-            aAddon.userDisabled = true;
-        }
+        aAddon.userDisabled = true;
     };
     let cbUndoRemoveLightning = function (aAddon) {
-        switch (aAddon.pendingOperations) {
-            case AddonManager.PENDING_DISABLE:
-                aAddon.userDisabled = false;
-                break;
-            case AddonManager.PENDING_UNINSTALL:
-                aAddon.cancelUninstall();
-                break;
-        }
+        aAddon.userDisabled = false;
     };
 
     // call backs for the undo opt-out bar
     let cbRestartNow = function(aNotificationBar, aButton) {
         Services.startup.quit(Components.interfaces.nsIAppStartup.eRestart |
                               Components.interfaces.nsIAppStartup.eForceQuit);
     };
     let cbUndoOptOut = function(aNotificationBar, aButton) {