Bug 1447051 - about:preferences should not offer to Preview PDFs when the DisableBuiltinPDFViewer policy is active r=bdahl,Felipe a=jcristau
authorKirk Steuber <ksteuber@mozilla.com>
Mon, 19 Mar 2018 11:35:39 -0700
changeset 462748 013a1953f0fc8a5e4f5cd76afeb63903c0f0a964
parent 462747 4f2e5b33fec12d0763e686a338aec7f779d7bf54
child 462749 1244252489a7491013bb0aaf81b5b07a24514159
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbdahl, Felipe, jcristau
bugs1447051
milestone60.0
Bug 1447051 - about:preferences should not offer to Preview PDFs when the DisableBuiltinPDFViewer policy is active r=bdahl,Felipe a=jcristau 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
@@ -3513,11 +3513,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");
   },
 };