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:
Ehsan Akhgari 2012-06-25 13:00:32 -04:00
parent 9fa48b7247
commit d25b53a796
2 changed files with 7 additions and 1 deletions

View File

@ -7131,6 +7131,10 @@ let gPrivateBrowsingUI = {
!this.privateBrowsingEnabled;
},
get autoStarted() {
return this._privateBrowsingService.autoStarted;
},
get privateBrowsingEnabled() {
return this._privateBrowsingService.privateBrowsingEnabled;
},

View File

@ -12,7 +12,9 @@ XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () {
const TOPIC = "private-browsing-transition-complete";
function getNewTabPageURL() {
if (("gPrivateBrowsingUI" in window) && gPrivateBrowsingUI.privateWindow)
if (("gPrivateBrowsingUI" in window) &&
gPrivateBrowsingUI.privateWindow &&
!gPrivateBrowsingUI.autoStarted)
return "about:privatebrowsing";
else
return Services.prefs.getCharPref(PREF) || "about:blank";