Bug 1418131: Part 2 - Add security software section to about:support; r=jimm
☠☠ backed out by 412cb15c6202 ☠ ☠
authorAaron Klotz <aklotz@mozilla.com>
Sat, 18 Nov 2017 13:59:45 -0700
changeset 451150 625b2d120fd9f71f06803e8bce619bb69eeea463
parent 451149 d66bae3d5be11415ce50fc35c3b6510f57678b02
child 451151 073eb94e1d21ce20fa1452d65be4f4fc420fe0d8
push id8543
push userryanvm@gmail.com
push dateTue, 16 Jan 2018 14:33:22 +0000
treeherdermozilla-beta@a6525ed16a32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1418131
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1418131: Part 2 - Add security software section to about:support; r=jimm MozReview-Commit-ID: 2hJkpPxFakp
toolkit/content/aboutSupport.js
toolkit/content/aboutSupport.xhtml
toolkit/locales/en-US/chrome/global/aboutSupport.dtd
toolkit/modules/Troubleshoot.jsm
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -178,16 +178,28 @@ var snapshotFormatters = {
         $.new("td", extension.name),
         $.new("td", extension.version),
         $.new("td", extension.isActive),
         $.new("td", extension.id),
       ]);
     }));
   },
 
+  securitySoftware: function securitySoftware(data) {
+    if (!AppConstants.isPlatformAndVersionAtLeast("win", "6.2")) {
+      $("security-software-title").hidden = true;
+      $("security-software-table").hidden = true;
+      return;
+    }
+
+    $("security-software-antivirus").textContent = data.registeredAntiVirus;
+    $("security-software-antispyware").textContent = data.registeredAntiSpyware;
+    $("security-software-firewall").textContent = data.registeredFirewall;
+  },
+
   features: function features(data) {
     $.append($("features-tbody"), data.map(function(feature) {
       return $.new("tr", [
         $.new("td", feature.name),
         $.new("td", feature.version),
         $.new("td", feature.id),
       ]);
     }));
--- a/toolkit/content/aboutSupport.xhtml
+++ b/toolkit/content/aboutSupport.xhtml
@@ -365,16 +365,63 @@
           </tr>
         </thead>
         <tbody id="extensions-tbody">
         </tbody>
       </table>
 
       <!-- - - - - - - - - - - - - - - - - - - - - -->
 
+      <h2 class="major-section" id="security-software-title">
+        &aboutSupport.securitySoftwareTitle;
+      </h2>
+
+      <table id="security-software-table">
+        <thead>
+          <tr>
+            <th>
+              &aboutSupport.securitySoftwareType;
+            </th>
+            <th>
+              &aboutSupport.securitySoftwareName;
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr>
+            <th class="column">
+              &aboutSupport.securitySoftwareAntivirus;
+            </th>
+
+            <td id="security-software-antivirus">
+            </td>
+          </tr>
+
+          <tr>
+            <th class="column">
+              &aboutSupport.securitySoftwareAntiSpyware;
+            </th>
+
+            <td id="security-software-antispyware">
+            </td>
+          </tr>
+
+          <tr>
+            <th class="column">
+              &aboutSupport.securitySoftwareFirewall;
+            </th>
+
+            <td id="security-software-firewall">
+            </td>
+          </tr>
+        </tbody>
+      </table>
+
+      <!-- - - - - - - - - - - - - - - - - - - - - -->
+
       <h2 class="major-section">
         &aboutSupport.graphicsTitle;
       </h2>
 
       <table>
         <tbody id="graphics-features-tbody">
           <tr>
             <th colspan="2" class="title-column">
--- a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
+++ b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
@@ -20,16 +20,23 @@ This is likely the same like id.heading 
 <!ENTITY aboutSupport.crashes.noConfig "This application has not been configured to display crash reports.">
 
 <!ENTITY aboutSupport.extensionsTitle "Extensions">
 <!ENTITY aboutSupport.extensionName "Name">
 <!ENTITY aboutSupport.extensionEnabled "Enabled">
 <!ENTITY aboutSupport.extensionVersion "Version">
 <!ENTITY aboutSupport.extensionId "ID">
 
+<!ENTITY aboutSupport.securitySoftwareTitle "Security Software">
+<!ENTITY aboutSupport.securitySoftwareType "Type">
+<!ENTITY aboutSupport.securitySoftwareName "Name">
+<!ENTITY aboutSupport.securitySoftwareAntivirus "Antivirus">
+<!ENTITY aboutSupport.securitySoftwareAntiSpyware "Antispyware">
+<!ENTITY aboutSupport.securitySoftwareFirewall "Firewall">
+
 <!ENTITY aboutSupport.featuresTitle "&brandShortName; Features">
 <!ENTITY aboutSupport.featureName "Name">
 <!ENTITY aboutSupport.featureVersion "Version">
 <!ENTITY aboutSupport.featureId "ID">
 
 <!ENTITY aboutSupport.experimentsTitle "Experimental Features">
 <!ENTITY aboutSupport.experimentName "Name">
 <!ENTITY aboutSupport.experimentId "ID">
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -284,16 +284,37 @@ var dataProviders = {
         return props.reduce(function(extData, prop) {
           extData[prop] = ext[prop];
           return extData;
         }, {});
       }));
     });
   },
 
+  securitySoftware: function securitySoftware(done) {
+    let data = {};
+
+    let sysInfo = Cc["@mozilla.org/system-info;1"].
+                  getService(Ci.nsIPropertyBag2);
+
+    const keys = ["registeredAntiVirus", "registeredAntiSpyware",
+                  "registeredFirewall"];
+    for (let key of keys) {
+      let prop = "";
+      try {
+        prop = sysInfo.getProperty(key);
+      } catch (e) {
+      }
+
+      data[key] = prop;
+    }
+
+    done(data);
+  },
+
   features: function features(done) {
     AddonManager.getAddonsByTypes(["extension"], function(features) {
       features = features.filter(f => f.isSystem);
       features.sort(function(a, b) {
         // In some unfortunate cases addon names can be null.
         let aname = a.name || null;
         let bname = b.name || null;
         let lc = aname.localeCompare(bname);