fune/browser/components/enterprisepolicies/EnterprisePoliciesContent.js
Felipe Gomes bea03efd33 Bug 1470324 - Clean up some unused code in EnterprisePoliciesContent.js. r=kmag
There was some unused code in this file which was wasting memory.

This patch also avoids some more policies from being sent to the content process as they are not really needed there

MozReview-Commit-ID: C4FzesWMQi0

--HG--
extra : rebase_source : ba21f04cca8614d9dd4b34f4e093ece0e3153502
2018-07-27 14:51:12 -03:00

27 lines
1.1 KiB
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
function EnterprisePoliciesManagerContent() {
}
EnterprisePoliciesManagerContent.prototype = {
classID: Components.ID("{dc6358f8-d167-4566-bf5b-4350b5e6a7a2}"),
QueryInterface: ChromeUtils.generateQI([Ci.nsIEnterprisePolicies]),
_xpcom_factory: XPCOMUtils.generateSingletonFactory(EnterprisePoliciesManagerContent),
get status() {
return Services.cpmm.sharedData.get("EnterprisePolicies:Status") ||
Ci.nsIEnterprisePolicies.INACTIVE;
},
isAllowed(feature) {
let disallowedFeatures = Services.cpmm.sharedData.get("EnterprisePolicies:DisallowedFeatures");
return !(disallowedFeatures && disallowedFeatures.has(feature));
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([EnterprisePoliciesManagerContent]);