Bug 767835 - Avoid using about:privatebrowsing as the new tab URL when permanent private browsing has been turned on; r=ttaubert
This commit is contained in:
@@ -7131,6 +7131,10 @@ let gPrivateBrowsingUI = {
|
|||||||
!this.privateBrowsingEnabled;
|
!this.privateBrowsingEnabled;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get autoStarted() {
|
||||||
|
return this._privateBrowsingService.autoStarted;
|
||||||
|
},
|
||||||
|
|
||||||
get privateBrowsingEnabled() {
|
get privateBrowsingEnabled() {
|
||||||
return this._privateBrowsingService.privateBrowsingEnabled;
|
return this._privateBrowsingService.privateBrowsingEnabled;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () {
|
|||||||
const TOPIC = "private-browsing-transition-complete";
|
const TOPIC = "private-browsing-transition-complete";
|
||||||
|
|
||||||
function getNewTabPageURL() {
|
function getNewTabPageURL() {
|
||||||
if (("gPrivateBrowsingUI" in window) && gPrivateBrowsingUI.privateWindow)
|
if (("gPrivateBrowsingUI" in window) &&
|
||||||
|
gPrivateBrowsingUI.privateWindow &&
|
||||||
|
!gPrivateBrowsingUI.autoStarted)
|
||||||
return "about:privatebrowsing";
|
return "about:privatebrowsing";
|
||||||
else
|
else
|
||||||
return Services.prefs.getCharPref(PREF) || "about:blank";
|
return Services.prefs.getCharPref(PREF) || "about:blank";
|
||||||
|
|||||||
Reference in New Issue
Block a user