Bug 1434985 - Convert EnterprisePolicies.disallowFeature uses to camelcase draft
authorKirk Steuber <ksteuber@mozilla.com>
Thu, 01 Feb 2018 11:20:26 -0800
changeset 750227 7e4220ba1d37da7a02ce2e84281309c68153b53c
parent 750078 5201997e7e01500176ce7d6e790593468f3b4259
child 750394 83a0629753f669bd283427dd31b07525b3d48df0
push id97587
push userksteuber@mozilla.com
push dateThu, 01 Feb 2018 19:21:01 +0000
bugs1434985
milestone60.0a1
Bug 1434985 - Convert EnterprisePolicies.disallowFeature uses to camelcase MozReview-Commit-ID: GDUSsEB6OYn
browser/base/content/nsContextMenu.js
browser/components/enterprisepolicies/Policies.jsm
--- 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);
     }