Bug 798280 - Pass privacy status to addDownload() in saveAsPDF. r=mfinkle
authorBrian Nicholson <bnicholson@mozilla.com>
Thu, 11 Oct 2012 13:59:34 -0700
changeset 110113 e15c81a5bf1d92932191d73a7aa7339805c9934d
parent 110112 80482a232127ba263427a061c4e7c853ea5b7ac9
child 110114 5b727a94eebdb8e6002546912e814c9c0c7556ac
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersmfinkle
bugs798280
milestone19.0a1
Bug 798280 - Pass privacy status to addDownload() in saveAsPDF. r=mfinkle
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -817,20 +817,21 @@ var BrowserApp = {
     let webBrowserPrint = aBrowser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                                                 .getInterface(Ci.nsIWebBrowserPrint);
 
     let cancelable = {
       cancel: function (aReason) {
         webBrowserPrint.cancel();
       }
     }
+    let isPrivate = aBrowser.docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing;
     let download = dm.addDownload(Ci.nsIDownloadManager.DOWNLOAD_TYPE_DOWNLOAD,
                                   aBrowser.currentURI,
                                   Services.io.newFileURI(file), "", mimeInfo,
-                                  Date.now() * 1000, null, cancelable);
+                                  Date.now() * 1000, null, cancelable, isPrivate);
 
     webBrowserPrint.print(printSettings, download);
   },
 
   getPreferences: function getPreferences(aPrefNames) {
     try {
       let json = JSON.parse(aPrefNames);
       let prefs = [];