Bug 729261 - Set private browsing attribute on windows that exist after transition into PB mode. r=ehsan

This commit is contained in:
Josh Matthews 2012-02-21 16:01:05 -05:00
Родитель 328f740cd5
Коммит 21e6ac3195
1 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -189,18 +189,6 @@ PrivateBrowsingService.prototype = {
}
win.close();
}
var windowsEnum = Services.wm.getEnumerator("navigator:browser");
while (windowsEnum.hasMoreElements()) {
var window = windowsEnum.getNext();
window.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.treeOwner
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIXULWindow)
.docShell.QueryInterface(Ci.nsILoadContext)
.usePrivateBrowsing = this._inPrivateBrowsing;
}
if (!this._quitting && this._saveSession) {
let browserWindow = this._getBrowserWindow();
@ -229,6 +217,18 @@ PrivateBrowsingService.prototype = {
.getInterface(Ci.nsIXULWindow)
.docShell.contentViewer.resetCloseWindow();
}
var windowsEnum = Services.wm.getEnumerator("navigator:browser");
while (windowsEnum.hasMoreElements()) {
var window = windowsEnum.getNext();
window.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.treeOwner
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIXULWindow)
.docShell.QueryInterface(Ci.nsILoadContext)
.usePrivateBrowsing = this._inPrivateBrowsing;
}
}
}
else