mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 798965 - Avoid using gPrivateBrowsingUI.privateBrowsingEnabled in browser.js and use the per-window PB API instead; r=jdm
This commit is contained in:
parent
0d95057a75
commit
c5ed2d6c2e
@ -521,7 +521,7 @@ var gPopupBlockerObserver = {
|
||||
blockedPopupAllowSite.setAttribute("hidden", "true");
|
||||
}
|
||||
|
||||
if (gPrivateBrowsingUI.privateBrowsingEnabled)
|
||||
if (PrivateBrowsingUtils.isWindowPrivate(window))
|
||||
blockedPopupAllowSite.setAttribute("disabled", "true");
|
||||
else
|
||||
blockedPopupAllowSite.removeAttribute("disabled");
|
||||
@ -2064,7 +2064,7 @@ var gLastOpenDirectory = {
|
||||
this._lastDir = val.clone();
|
||||
|
||||
// Don't save the last open directory pref inside the Private Browsing mode
|
||||
if (!gPrivateBrowsingUI.privateBrowsingEnabled)
|
||||
if (!PrivateBrowsingUtils.isWindowPrivate(window))
|
||||
gPrefService.setComplexValue("browser.open.lastDir", Ci.nsILocalFile,
|
||||
this._lastDir);
|
||||
},
|
||||
@ -3235,7 +3235,7 @@ const DOMLinkHandler = {
|
||||
|
||||
if (type == "application/opensearchdescription+xml" && link.title &&
|
||||
/^(?:https?|ftp):/i.test(link.href) &&
|
||||
!gPrivateBrowsingUI.privateBrowsingEnabled) {
|
||||
!PrivateBrowsingUtils.isWindowPrivate(window)) {
|
||||
var engine = { title: link.title, href: link.href };
|
||||
BrowserSearch.addEngine(engine, link.ownerDocument);
|
||||
searchAdded = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user