Bug 1447051 - about:preferences should not offer to Preview PDFs when the DisableBuiltinPDFViewer policy is active draft
authorKirk Steuber <ksteuber@mozilla.com>
Mon, 19 Mar 2018 11:35:39 -0700
changeset 769522 ced44e26f630a8f7502f31748a2138585cd56e2a
parent 769320 4f1014eb5039bdfdd7a39fb7785d102df1994a6f
push id103154
push userksteuber@mozilla.com
push dateMon, 19 Mar 2018 18:39:15 +0000
bugs1447051
milestone61.0a1
Bug 1447051 - about:preferences should not offer to Preview PDFs when the DisableBuiltinPDFViewer policy is active MozReview-Commit-ID: B2R6SUbAyXP
browser/components/preferences/in-content/main.js
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -3514,11 +3514,12 @@ InternalHandlerInfoWrapper.prototype = {
   }
 };
 
 var pdfHandlerInfo = {
   __proto__: new InternalHandlerInfoWrapper(TYPE_PDF),
   _handlerChanged: TOPIC_PDFJS_HANDLER_CHANGED,
   _appPrefLabel: "portableDocumentFormat",
   get enabled() {
-    return !Services.prefs.getBoolPref(PREF_PDFJS_DISABLED);
+    return !Services.prefs.getBoolPref(PREF_PDFJS_DISABLED) &&
+           Services.policies.isAllowed("PDF.js");
   },
 };