Bug 1434985 - Convert EnterprisePolicies.disallowFeature uses to camelcase
MozReview-Commit-ID: GDUSsEB6OYn
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -447,17 +447,17 @@ nsContextMenu.prototype = {
this.showItem("context-sep-viewsource", shouldShow);
// Set as Desktop background depends on whether an image was clicked on,
// and only works if we have a shell service.
var haveSetDesktopBackground = false;
if (AppConstants.HAVE_SHELL_SERVICE &&
- Services.policies.isAllowed("set_desktop_background")) {
+ Services.policies.isAllowed("setDesktopBackground")) {
// Only enable Set as Desktop Background if we can get the shell service.
var shell = getShellService();
if (shell)
haveSetDesktopBackground = shell.canSetDesktopBackground;
}
this.showItem("context-setDesktopBackground",
haveSetDesktopBackground && this.onLoadedImage);
@@ -1014,17 +1014,17 @@ nsContextMenu.prototype = {
mm.sendAsyncMessage("ContextMenu:SetAsDesktopBackground", null,
{ target: this.target });
let onMessage = (message) => {
mm.removeMessageListener("ContextMenu:SetAsDesktopBackground:Result",
onMessage);
if (message.data.disable ||
- !Services.policies.isAllowed("set_desktop_background")) {
+ !Services.policies.isAllowed("setDesktopBackground")) {
return;
}
let image = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
image.src = message.data.dataUrl;
let imageName = message.data.imageName;
// Confirm since it's annoying if you hit this accidentally.
--- a/browser/components/enterprisepolicies/Policies.jsm
+++ b/browser/components/enterprisepolicies/Policies.jsm
@@ -74,17 +74,17 @@ this.Policies = {
}
}
}
},
"block_set_desktop_background": {
onBeforeUIStartup(manager, param) {
if (param == true) {
- manager.disallowFeature("set_desktop_background", true);
+ manager.disallowFeature("setDesktopBackground", true);
}
}
},
"dont_check_default_browser": {
onBeforeUIStartup(manager, param) {
setAndLockPref("browser.shell.checkDefaultBrowser", false);
}