Bug 1400660 - Create a new pref to determine the initial state of the 'See details' panel in about:blocked pages. r=francois,johannh

MozReview-Commit-ID: CxZmvc34ULB

--HG--
extra : rebase_source : 055de125019437d62734bd77f1de85c4c8bb09b6
This commit is contained in:
Prathiksha 2017-10-28 01:56:31 +05:30
parent 6c334569cd
commit 71ab20ed37
2 changed files with 8 additions and 0 deletions

View File

@ -654,6 +654,7 @@ pref("mousewheel.with_win.action", 1);
pref("browser.xul.error_pages.enabled", true);
pref("browser.xul.error_pages.expert_bad_cert", false);
pref("browser.xul.error_pages.show_safe_browsing_details_on_load", false);
// Enable captive portal detection.
pref("network.captive-portal-service.enabled", true);

View File

@ -199,6 +199,13 @@ var AboutBlockedSiteListener = {
doc.getElementById("firefox_support").setAttribute("href",
"https://support.mozilla.org/kb/how-does-phishing-and-malware-protection-work");
// Show safe browsing details on load if the pref is set to true.
let showDetails = Services.prefs.getBoolPref("browser.xul.error_pages.show_safe_browsing_details_on_load");
if (showDetails) {
let details = content.document.getElementById("errorDescriptionContainer");
details.removeAttribute("hidden");
}
// Set safe browsing advisory link.
let advisoryUrl = Services.prefs.getCharPref(
"browser.safebrowsing.provider." + provider + ".advisoryURL", "");