Bug 798280 - Follow-up for using PrivateBrowsingUtils. r=ehsan

This commit is contained in:
Brian Nicholson 2012-10-12 10:27:07 -07:00
parent 060089681c
commit f210058797

View File

@ -14,6 +14,7 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/AddonManager.jsm");
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/JNI.jsm");
Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
#ifdef ACCESSIBILITY
Cu.import("resource://gre/modules/accessibility/AccessFu.jsm");
@ -822,7 +823,7 @@ var BrowserApp = {
webBrowserPrint.cancel();
}
}
let isPrivate = aBrowser.docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing;
let isPrivate = PrivateBrowsingUtils.isWindowPrivate(aBrowser.contentWindow);
let download = dm.addDownload(Ci.nsIDownloadManager.DOWNLOAD_TYPE_DOWNLOAD,
aBrowser.currentURI,
Services.io.newFileURI(file), "", mimeInfo,