| Index: chrome/content/ui/sendReport.js |
| =================================================================== |
| --- a/chrome/content/ui/sendReport.js |
| +++ b/chrome/content/ui/sendReport.js |
| @@ -16,28 +16,28 @@ |
| */ |
| // |
| // Report data template, more data will be added during data collection |
| // |
| let {Services} = Cu.import("resource://gre/modules/Services.jsm", {}); |
| let {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm", {}); |
| -let {PrivateBrowsingUtils} = Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm", {}); |
| const MILLISECONDS_IN_SECOND = 1000; |
| const SECONDS_IN_MINUTE = 60; |
| const SECONDS_IN_HOUR = 60 * SECONDS_IN_MINUTE; |
| const SECONDS_IN_DAY = 24 * SECONDS_IN_HOUR; |
| let contentWindow = window.arguments[0]; |
| let windowURI = window.arguments[1]; |
| if (typeof windowURI == "string") |
| windowURI = Services.newURI(windowURI, null, null); |
| let browser = window.arguments[2]; |
| +let isPrivate = false; |
| let reportData = new DOMParser().parseFromString("<report></report>", "text/xml"); |
| // Some helper functions to work with the report data |
| function reportElement(tag) |
| { |
| for (let child = reportData.documentElement.firstChild; child; child = child.nextSibling) |
| if (child.nodeType == Node.ELEMENT_NODE && child.tagName == tag) |
| @@ -93,17 +93,16 @@ function serializeReportData() |
| element.setAttribute("version", Services.appinfo.platformVersion); |
| element.setAttribute("build", Services.appinfo.platformBuildID); |
| }; |
| { |
| let element = reportElement("options"); |
| appendElement(element, "option", {id: "enabled"}, Prefs.enabled); |
| appendElement(element, "option", {id: "objecttabs"}, Prefs.frameobjects); |
| appendElement(element, "option", {id: "collapse"}, !Prefs.fastcollapse); |
| - appendElement(element, "option", {id: "privateBrowsing"}, PrivateBrowsingUtils.isContentWindowPrivate(contentWindow)); |
| appendElement(element, "option", {id: "subscriptionsAutoUpdate"}, Prefs.subscriptions_autoupdate); |
| appendElement(element, "option", {id: "javascript"}, Services.prefs.getBoolPref("javascript.enabled")); |
| appendElement(element, "option", {id: "cookieBehavior"}, Services.prefs.getIntPref("network.cookie.cookieBehavior")); |
| }; |
| // |
| // Data collectors |
| // |
| @@ -327,16 +326,22 @@ var remoteDataSource = |
| let outerWindowID = wnd.QueryInterface(Ci.nsIInterfaceRequestor) |
| .getInterface(Ci.nsIDOMWindowUtils) |
| .outerWindowID; |
| let dataCollector = require("dataCollector"); |
| let screenshotWidth = screenshotDataSource.getWidth(); |
| dataCollector.collectData(outerWindowID, screenshotWidth, data => { |
| screenshotDataSource.setData(data && data.screenshot); |
| framesDataSource.setData(windowURI, data && data.opener, data && data.referrer, data && data.frames); |
| + |
| + if (data && data.isPrivate) |
| + isPrivate = true; |
| + let element = reportElement("options"); |
| + appendElement(element, "option", {id: "privateBrowsing"}, isPrivate); |
| + |
| callback(); |
| }); |
| } |
| } |
| var screenshotDataSource = |
| { |
| imageOffset: 10, |
| @@ -1513,17 +1518,17 @@ function reportSent(event) |
| { |
| try |
| { |
| let link = request.responseXML.getElementById("link").getAttribute("href"); |
| let button = E("copyLink"); |
| button.setAttribute("url", link); |
| button.removeAttribute("disabled"); |
| - if (!PrivateBrowsingUtils.isContentWindowPrivate(contentWindow)) |
| + if (!isPrivate) |
| reportsListDataSource.addReport(framesDataSource.site, link); |
| } catch (e) {} |
| E("copyLinkBox").hidden = false; |
| document.documentElement.getButton("finish").disabled = false; |
| document.documentElement.getButton("cancel").disabled = true; |
| E("progressBar").activeItemComplete = true; |
| } |