Bug 1410522 - Enable download protection on non-official builds too. r=gcp,johannh

This reverts the change introduced in bug 1394053.

Google has made the download protection lists available to everyone
and so we no longer need to restrict the download protection feature
to official builds.

MozReview-Commit-ID: CQcG5Ip1mDV

--HG--
extra : rebase_source : 55ff4f1e5a09e3c83ad9b24b2eb44789834b2357
This commit is contained in:
Francois Marier 2018-01-29 15:51:14 -08:00
Родитель 36120a0978
Коммит ece90c9c66
4 изменённых файлов: 1 добавлений и 15 удалений

Просмотреть файл

@ -620,11 +620,9 @@
class="learnMore text-link">&enableSafeBrowsingLearnMore.label;</label>
</hbox>
<vbox class="indent">
#ifdef MOZILLA_OFFICIAL
<checkbox id="blockDownloads"
label="&blockDownloads.label;"
accesskey="&blockDownloads.accesskey;" />
#endif
<checkbox id="blockUncommonUnwanted"
label="&blockUncommonAndUnwanted.label;"
accesskey="&blockUncommonAndUnwanted.accesskey;" />

Просмотреть файл

@ -40,11 +40,7 @@ add_task(async function() {
let blockDownloads = doc.getElementById("blockDownloads");
let blockUncommon = doc.getElementById("blockUncommonUnwanted");
let checked = checkbox.checked;
if (!AppConstants.MOZILLA_OFFICIAL) {
is(blockDownloads, undefined, "downloads protection is disabled in un-official builds");
} else {
is(blockDownloads.hasAttribute("disabled"), !checked, "block downloads checkbox is set correctly");
}
is(blockDownloads.hasAttribute("disabled"), !checked, "block downloads checkbox is set correctly");
is(checked, val1 && val2, "safebrowsing preference is initialized correctly");
// should be disabled when checked is false (= pref is turned off)

Просмотреть файл

@ -36,10 +36,6 @@ add_task(async function() {
let doc = gBrowser.selectedBrowser.contentDocument;
let checkbox = doc.getElementById("blockDownloads");
if (!AppConstants.MOZILLA_OFFICIAL) {
is(checkbox, undefined, "downloads protection is disabled in un-official builds");
return;
}
let blockUncommon = doc.getElementById("blockUncommonUnwanted");
let checked = checkbox.checked;

Просмотреть файл

@ -5450,11 +5450,7 @@ pref("browser.safebrowsing.id", "Firefox");
#endif
// Download protection
#ifdef MOZILLA_OFFICIAL
pref("browser.safebrowsing.downloads.enabled", true);
#else
pref("browser.safebrowsing.downloads.enabled", false);
#endif
pref("browser.safebrowsing.downloads.remote.enabled", true);
pref("browser.safebrowsing.downloads.remote.timeout_ms", 10000);
pref("browser.safebrowsing.downloads.remote.url", "https://sb-ssl.google.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%");