Bug 1191421: Don't notify users about unsigned experiments that have been disabled. r=dao
authorDave Townsend <dtownsend@oxymoronical.com>
Wed, 05 Aug 2015 13:33:57 -0700
changeset 288069 2b359bf46360b01d930b8ffdde1f325859d0e155
parent 288068 dac4fbb3f906ff1e869f3de7ef625d01a1653670
child 288070 670b14b5b033de46a55acfa8c985a116fefdffea
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1191421
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1191421: Don't notify users about unsigned experiments that have been disabled. r=dao
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -486,18 +486,25 @@ BrowserGlue.prototype = {
           }
         }
         break;
 #endif
       case "flash-plugin-hang":
         this._handleFlashHang();
         break;
       case "xpi-signature-changed":
-        if (JSON.parse(data).disabled.length)
-          this._notifyUnsignedAddonsDisabled();
+        let disabledAddons = JSON.parse(data).disabled;
+        AddonManager.getAddonsByIDs(disabledAddons, (addons) => {
+          for (let addon of addons) {
+            if (addon.type != "experiment") {
+              this._notifyUnsignedAddonsDisabled();
+              break;
+            }
+          }
+        });
         break;
       case "autocomplete-did-enter-text":
         this._handleURLBarTelemetry(subject.QueryInterface(Ci.nsIAutoCompleteInput));
         break;
     }
   },
 
   _handleURLBarTelemetry(input) {
@@ -1155,16 +1162,19 @@ BrowserGlue.prototype = {
           win.openUILinkIn("about:newaddon?id=" + aAddon.id, "tab");
         })
       });
     }
 
     let disabledAddons = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_DISABLED);
     AddonManager.getAddonsByIDs(disabledAddons, (addons) => {
       for (let addon of addons) {
+        if (addon.type == "experiment")
+          continue;
+
         if (addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) {
           this._notifyUnsignedAddonsDisabled();
           break;
         }
       }
     });
 
     // Perform default browser checking.