Bug 826384: Kill post-install notification doorhanger. [r=mfinkle] [a=akeybl] FIREFOX_BETA_19_BASE
authorSriram Ramasubramanian <sriram@mozilla.com>
Thu, 03 Jan 2013 13:38:53 -0800
changeset 119240 09dd216e6408b96c19faf366f767874e25fa6e40
parent 119239 fc44cc7dd21ed8c44f02546b68885229b7d6f055
child 119241 b6ddd61fb93a77814e8c4bbd30cc41b8c6367c19
push id3126
push usersramasubramanian@mozilla.com
push dateMon, 07 Jan 2013 18:57:22 +0000
treeherdermozilla-aurora@09dd216e6408 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, akeybl
bugs826384
milestone19.0a2
Bug 826384: Kill post-install notification doorhanger. [r=mfinkle] [a=akeybl]
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -2188,48 +2188,17 @@ var LightWeightThemeWebInstaller = {
         LightWeightThemeWebInstaller._install(data);
       }
     }];
 
     NativeWindow.doorhanger.show(message, "Personas", buttons, BrowserApp.selectedTab.id);
   },
 
   _install: function (newLWTheme) {
-    let previousLWTheme = this._manager.currentTheme;
-
-    let listener = {
-      onEnabled: function(aAddon) {
-        LightWeightThemeWebInstaller._postInstallNotification(newLWTheme, previousLWTheme);
-      }
-    };
-
-    AddonManager.addAddonListener(listener);
     this._manager.currentTheme = newLWTheme;
-    AddonManager.removeAddonListener(listener);
-  },
-
-  _postInstallNotification: function (newTheme, previousTheme) {
-    let buttons = [{
-      label: Strings.browser.GetStringFromName("lwthemePostInstallNotification.undoButton"),
-      callback: function () {
-        LightWeightThemeWebInstaller._manager.forgetUsedTheme(newTheme.id);
-        LightWeightThemeWebInstaller._manager.currentTheme = previousTheme;
-      }
-    }, {
-      label: Strings.browser.GetStringFromName("lwthemePostInstallNotification.manageButton"),
-      callback: function () {
-        BrowserApp.addTab("about:addons", {
-          showProgress: false,
-          selected: true
-        });
-      }
-    }];
-
-    let message = Strings.browser.GetStringFromName("lwthemePostInstallNotification.message"); 
-    NativeWindow.doorhanger.show(message, "Personas", buttons, BrowserApp.selectedTab.id);
   },
 
   _previewWindow: null,
   _preview: function (event) {
     if (!this._isAllowed(event.target))
       return;
     let data = this._getThemeFromNode(event.target);
     if (!data)