зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1519660 - Remove flash info bar from SafeBrowsing list. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D16397 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1116d6d4b0
Коммит
dcc7462a9b
|
@ -5555,7 +5555,7 @@ pref("urlclassifier.trackingTable", "test-track-simple,base-track-digest256");
|
||||||
pref("urlclassifier.trackingWhitelistTable", "test-trackwhite-simple,mozstd-trackwhite-digest256");
|
pref("urlclassifier.trackingWhitelistTable", "test-trackwhite-simple,mozstd-trackwhite-digest256");
|
||||||
|
|
||||||
// These tables will never trigger a gethash call.
|
// These tables will never trigger a gethash call.
|
||||||
pref("urlclassifier.disallow_completions", "test-malware-simple,test-harmful-simple,test-phish-simple,test-unwanted-simple,test-track-simple,test-trackwhite-simple,test-block-simple,goog-downloadwhite-digest256,base-track-digest256,mozstd-trackwhite-digest256,content-track-digest256,mozplugin-block-digest256,mozplugin2-block-digest256,block-flash-digest256,except-flash-digest256,allow-flashallow-digest256,except-flashallow-digest256,block-flashsubdoc-digest256,except-flashsubdoc-digest256,except-flashinfobar-digest256,goog-passwordwhite-proto,ads-track-digest256,social-track-digest256,analytics-track-digest256");
|
pref("urlclassifier.disallow_completions", "test-malware-simple,test-harmful-simple,test-phish-simple,test-unwanted-simple,test-track-simple,test-trackwhite-simple,test-block-simple,goog-downloadwhite-digest256,base-track-digest256,mozstd-trackwhite-digest256,content-track-digest256,mozplugin-block-digest256,mozplugin2-block-digest256,block-flash-digest256,except-flash-digest256,allow-flashallow-digest256,except-flashallow-digest256,block-flashsubdoc-digest256,except-flashsubdoc-digest256,goog-passwordwhite-proto,ads-track-digest256,social-track-digest256,analytics-track-digest256");
|
||||||
|
|
||||||
// Number of random entries to send with a gethash request
|
// Number of random entries to send with a gethash request
|
||||||
pref("urlclassifier.gethashnoise", 4);
|
pref("urlclassifier.gethashnoise", 4);
|
||||||
|
@ -5624,7 +5624,7 @@ pref("browser.safebrowsing.reportPhishURL", "https://%LOCALE%.phish-report.mozil
|
||||||
|
|
||||||
// Mozilla Safe Browsing provider (for tracking protection and plugin blocking)
|
// Mozilla Safe Browsing provider (for tracking protection and plugin blocking)
|
||||||
pref("browser.safebrowsing.provider.mozilla.pver", "2.2");
|
pref("browser.safebrowsing.provider.mozilla.pver", "2.2");
|
||||||
pref("browser.safebrowsing.provider.mozilla.lists", "base-track-digest256,mozstd-trackwhite-digest256,content-track-digest256,mozplugin-block-digest256,mozplugin2-block-digest256,block-flash-digest256,except-flash-digest256,allow-flashallow-digest256,except-flashallow-digest256,block-flashsubdoc-digest256,except-flashsubdoc-digest256,except-flashinfobar-digest256,ads-track-digest256,social-track-digest256,analytics-track-digest256");
|
pref("browser.safebrowsing.provider.mozilla.lists", "base-track-digest256,mozstd-trackwhite-digest256,content-track-digest256,mozplugin-block-digest256,mozplugin2-block-digest256,block-flash-digest256,except-flash-digest256,allow-flashallow-digest256,except-flashallow-digest256,block-flashsubdoc-digest256,except-flashsubdoc-digest256,ads-track-digest256,social-track-digest256,analytics-track-digest256");
|
||||||
pref("browser.safebrowsing.provider.mozilla.updateURL", "https://shavar.services.mozilla.com/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2");
|
pref("browser.safebrowsing.provider.mozilla.updateURL", "https://shavar.services.mozilla.com/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2");
|
||||||
pref("browser.safebrowsing.provider.mozilla.gethashURL", "https://shavar.services.mozilla.com/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2");
|
pref("browser.safebrowsing.provider.mozilla.gethashURL", "https://shavar.services.mozilla.com/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2");
|
||||||
// Set to a date in the past to force immediate download in new profiles.
|
// Set to a date in the past to force immediate download in new profiles.
|
||||||
|
@ -5645,7 +5645,6 @@ pref("urlclassifier.flashTable", "block-flash-digest256");
|
||||||
pref("urlclassifier.flashExceptTable", "except-flash-digest256");
|
pref("urlclassifier.flashExceptTable", "except-flash-digest256");
|
||||||
pref("urlclassifier.flashSubDocTable", "block-flashsubdoc-digest256");
|
pref("urlclassifier.flashSubDocTable", "block-flashsubdoc-digest256");
|
||||||
pref("urlclassifier.flashSubDocExceptTable", "except-flashsubdoc-digest256");
|
pref("urlclassifier.flashSubDocExceptTable", "except-flashsubdoc-digest256");
|
||||||
pref("urlclassifier.flashInfobarTable", "except-flashinfobar-digest256");
|
|
||||||
|
|
||||||
// Turn off Spatial navigation by default.
|
// Turn off Spatial navigation by default.
|
||||||
pref("snav.enabled", false);
|
pref("snav.enabled", false);
|
||||||
|
|
|
@ -49,7 +49,6 @@ const tablePreferences = [
|
||||||
"urlclassifier.flashExceptTable",
|
"urlclassifier.flashExceptTable",
|
||||||
"urlclassifier.flashSubDocTable",
|
"urlclassifier.flashSubDocTable",
|
||||||
"urlclassifier.flashSubDocExceptTable",
|
"urlclassifier.flashSubDocExceptTable",
|
||||||
"urlclassifier.flashInfobarTable",
|
|
||||||
];
|
];
|
||||||
|
|
||||||
var SafeBrowsing = {
|
var SafeBrowsing = {
|
||||||
|
@ -64,7 +63,6 @@ var SafeBrowsing = {
|
||||||
Services.prefs.addObserver("privacy.trackingprotection", this);
|
Services.prefs.addObserver("privacy.trackingprotection", this);
|
||||||
Services.prefs.addObserver("urlclassifier", this);
|
Services.prefs.addObserver("urlclassifier", this);
|
||||||
Services.prefs.addObserver("plugins.flashBlock.enabled", this);
|
Services.prefs.addObserver("plugins.flashBlock.enabled", this);
|
||||||
Services.prefs.addObserver("plugins.show_infobar", this);
|
|
||||||
|
|
||||||
this.readPrefs();
|
this.readPrefs();
|
||||||
this.addMozEntries();
|
this.addMozEntries();
|
||||||
|
@ -130,9 +128,6 @@ var SafeBrowsing = {
|
||||||
for (let i = 0; i < this.flashLists.length; ++i) {
|
for (let i = 0; i < this.flashLists.length; ++i) {
|
||||||
this.registerTableWithURLs(this.flashLists[i]);
|
this.registerTableWithURLs(this.flashLists[i]);
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.flashInfobarLists.length; ++i) {
|
|
||||||
this.registerTableWithURLs(this.flashInfobarLists[i]);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
unregisterTables(obsoleteLists) {
|
unregisterTables(obsoleteLists) {
|
||||||
|
@ -156,7 +151,6 @@ var SafeBrowsing = {
|
||||||
blockedEnabled: false,
|
blockedEnabled: false,
|
||||||
trackingAnnotations: false,
|
trackingAnnotations: false,
|
||||||
flashBlockEnabled: false,
|
flashBlockEnabled: false,
|
||||||
flashInfobarListEnabled: false,
|
|
||||||
|
|
||||||
phishingLists: [],
|
phishingLists: [],
|
||||||
malwareLists: [],
|
malwareLists: [],
|
||||||
|
@ -169,7 +163,6 @@ var SafeBrowsing = {
|
||||||
trackingProtectionWhitelists: [],
|
trackingProtectionWhitelists: [],
|
||||||
blockedLists: [],
|
blockedLists: [],
|
||||||
flashLists: [],
|
flashLists: [],
|
||||||
flashInfobarLists: [],
|
|
||||||
|
|
||||||
updateURL: null,
|
updateURL: null,
|
||||||
gethashURL: null,
|
gethashURL: null,
|
||||||
|
@ -240,7 +233,6 @@ var SafeBrowsing = {
|
||||||
this.blockedEnabled = Services.prefs.getBoolPref("browser.safebrowsing.blockedURIs.enabled");
|
this.blockedEnabled = Services.prefs.getBoolPref("browser.safebrowsing.blockedURIs.enabled");
|
||||||
this.trackingAnnotations = Services.prefs.getBoolPref("privacy.trackingprotection.annotate_channels");
|
this.trackingAnnotations = Services.prefs.getBoolPref("privacy.trackingprotection.annotate_channels");
|
||||||
this.flashBlockEnabled = Services.prefs.getBoolPref("plugins.flashBlock.enabled");
|
this.flashBlockEnabled = Services.prefs.getBoolPref("plugins.flashBlock.enabled");
|
||||||
this.flashInfobarListEnabled = Services.prefs.getBoolPref("plugins.show_infobar", false);
|
|
||||||
|
|
||||||
let flashAllowTable, flashAllowExceptTable, flashTable,
|
let flashAllowTable, flashAllowExceptTable, flashTable,
|
||||||
flashExceptTable, flashSubDocTable,
|
flashExceptTable, flashSubDocTable,
|
||||||
|
@ -259,8 +251,7 @@ var SafeBrowsing = {
|
||||||
this.trackingProtectionLists,
|
this.trackingProtectionLists,
|
||||||
this.trackingProtectionWhitelists,
|
this.trackingProtectionWhitelists,
|
||||||
this.blockedLists,
|
this.blockedLists,
|
||||||
this.flashLists,
|
this.flashLists];
|
||||||
this.flashInfobarLists];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[this.phishingLists,
|
[this.phishingLists,
|
||||||
|
@ -278,8 +269,7 @@ var SafeBrowsing = {
|
||||||
flashTable,
|
flashTable,
|
||||||
flashExceptTable,
|
flashExceptTable,
|
||||||
flashSubDocTable,
|
flashSubDocTable,
|
||||||
flashSubDocExceptTable,
|
flashSubDocExceptTable] = tablePreferences.map(getLists);
|
||||||
this.flashInfobarLists] = tablePreferences.map(getLists);
|
|
||||||
|
|
||||||
this.flashLists = flashAllowTable.concat(flashAllowExceptTable,
|
this.flashLists = flashAllowTable.concat(flashAllowExceptTable,
|
||||||
flashTable,
|
flashTable,
|
||||||
|
@ -298,8 +288,7 @@ var SafeBrowsing = {
|
||||||
this.trackingProtectionLists,
|
this.trackingProtectionLists,
|
||||||
this.trackingProtectionWhitelists,
|
this.trackingProtectionWhitelists,
|
||||||
this.blockedLists,
|
this.blockedLists,
|
||||||
this.flashLists,
|
this.flashLists];
|
||||||
this.flashInfobarLists];
|
|
||||||
|
|
||||||
for (let i = 0; i < obsoleteLists.length; ++i) {
|
for (let i = 0; i < obsoleteLists.length; ++i) {
|
||||||
obsoleteLists[i] = obsoleteLists[i]
|
obsoleteLists[i] = obsoleteLists[i]
|
||||||
|
@ -403,8 +392,7 @@ var SafeBrowsing = {
|
||||||
"trackingEnabled:", this.trackingEnabled,
|
"trackingEnabled:", this.trackingEnabled,
|
||||||
"blockedEnabled:", this.blockedEnabled,
|
"blockedEnabled:", this.blockedEnabled,
|
||||||
"trackingAnnotations", this.trackingAnnotations,
|
"trackingAnnotations", this.trackingAnnotations,
|
||||||
"flashBlockEnabled", this.flashBlockEnabled,
|
"flashBlockEnabled", this.flashBlockEnabled);
|
||||||
"flashInfobarListEnabled:", this.flashInfobarListEnabled);
|
|
||||||
|
|
||||||
let listManager = Cc["@mozilla.org/url-classifier/listmanager;1"].
|
let listManager = Cc["@mozilla.org/url-classifier/listmanager;1"].
|
||||||
getService(Ci.nsIUrlListManager);
|
getService(Ci.nsIUrlListManager);
|
||||||
|
@ -466,11 +454,6 @@ var SafeBrowsing = {
|
||||||
listManager.enableUpdate(this.flashLists[i]);
|
listManager.enableUpdate(this.flashLists[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.flashInfobarLists.length; ++i) {
|
|
||||||
if (this.flashInfobarListEnabled) {
|
|
||||||
listManager.enableUpdate(this.flashInfobarLists[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
listManager.maybeToggleUpdateChecking();
|
listManager.maybeToggleUpdateChecking();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче