зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1418131: Part 2 - Add security software section to about:support; r=jimm
MozReview-Commit-ID: 2hJkpPxFakp --HG-- extra : rebase_source : cd9fa09f22734fa2dceb5f0288fb414597fc5d57
This commit is contained in:
Родитель
e55cbf9e1a
Коммит
e6d7c63330
|
@ -183,6 +183,18 @@ var snapshotFormatters = {
|
|||
}));
|
||||
},
|
||||
|
||||
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", [
|
||||
|
|
|
@ -370,6 +370,53 @@
|
|||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<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>
|
||||
|
|
|
@ -25,6 +25,13 @@ This is likely the same like id.heading in crashes.dtd. -->
|
|||
<!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">
|
||||
|
|
|
@ -289,6 +289,27 @@ var dataProviders = {
|
|||
});
|
||||
},
|
||||
|
||||
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче