Bug 928068 - Story - Don't allow switching to Metro while in private browser mode. r=bbondy
authorMarina Samuel <msamuel@mozilla.com>
Tue, 19 Nov 2013 16:33:37 -0500
changeset 172699 074a7f87397c8ba70de62d9d2edeb31c86e460b3
parent 172698 5257899d8b21d416137402dfa3bb485437c6574a
child 172700 594ae98c4fddece56d517b829b00c7527869ab28
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy
bugs928068
milestone28.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 928068 - Story - Don't allow switching to Metro while in private browser mode. r=bbondy
browser/components/customizableui/src/CustomizableUI.jsm
--- a/browser/components/customizableui/src/CustomizableUI.jsm
+++ b/browser/components/customizableui/src/CustomizableUI.jsm
@@ -1674,16 +1674,20 @@ let CustomizableUIInternal = {
       showInPrivateBrowsing: true,
     };
 
     if (typeof aData.id != "string" || !/^[a-z0-9-_]{1,}$/i.test(aData.id)) {
       ERROR("Given an illegal id in normalizeWidget: " + aData.id);
       return null;
     }
 
+    if (aData.id == "switch-to-metro-button") {
+      widget.showInPrivateBrowsing = false;
+    }
+
     delete widget.implementation.currentArea;
     widget.implementation.__defineGetter__("currentArea", function() widget.currentArea);
 
     const kReqStringProps = ["id"];
     for (let prop of kReqStringProps) {
       if (typeof aData[prop] != "string") {
         ERROR("Missing required property '" + prop + "' in normalizeWidget: "
               + aData.id);