Bug 853996 - Make sure that opening a new window in permanent private browsing mode never shows about:privatebrowsing; r=jdm a=lsblakk
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 24 Mar 2013 12:07:28 -0400
changeset 127790 116acfdc505999c92eb91785d05c7733515640ec
parent 127789 5573b93cd43ddf10bcaaac7987261a4d0c43bc37
child 127791 5444887515142ec7a542d5582fb2b97817fed0cb
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
reviewersjdm, lsblakk
bugs853996
milestone20.0
Bug 853996 - Make sure that opening a new window in permanent private browsing mode never shows about:privatebrowsing; r=jdm a=lsblakk
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3535,18 +3535,20 @@ function OpenBrowserWindow(options)
 
   var extraFeatures = "";
 #ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
   if (options && options.private) {
 #else
   if (gPrivateBrowsingUI.privateBrowsingEnabled) {
 #endif
     extraFeatures = ",private";
-    // Force the new window to load about:privatebrowsing instead of the default home page
-    defaultArgs = "about:privatebrowsing";
+    if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
+      // Force the new window to load about:privatebrowsing instead of the default home page
+      defaultArgs = "about:privatebrowsing";
+    }
   } else {
     extraFeatures = ",non-private";
   }
 
   // if and only if the current window is a browser window and it has a document with a character
   // set, then extract the current charset menu setting from the current document and use it to
   // initialize the new browser window...
   var win;