This patches only allows Safe Browsing to download the list, but the feature
is still default disabled and the lists will not be downloaded.
Turn on social tracking by setting:
"privacy.trackingprotection.socialtracking.enabled"
"privacy.trackingprotection.socialtracking.annotate.enabled"
Differential Revision: https://phabricator.services.mozilla.com/D37410
Create test entries via update introduces performance overhead.
We can store them directly in LookupCache and do not save test entries
to disk.
Differential Revision: https://phabricator.services.mozilla.com/D34576
Add preferences "browser.safebrowsing.features.[feature name].update".
Normally these preferences won't be set so the SafeBrowsing uses features's
enable/disable preferences to decide if it should update the list or
not.
If an update preference is present, then it has higher priority then the
enable/disable one.
This provides a way for the SafeBrowsing consumer to be able to separate
feature toggle and upodate.
Differential Revision: https://phabricator.services.mozilla.com/D17233
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8
This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:
ChromeUtils.import("resource://gre/modules/Services.jsm");
is approximately the same as the following, in the new model:
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs
This was done using the followng script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16750
Add the fingerprinting and cryptomining tables to the SafeBrowsing
update list.
Leave the preference of blacklist/whitelist tables empty until the
shavar server is ready.
Differential Revision: https://phabricator.services.mozilla.com/D16533
When we add a table to SafeBrowsing.jsm we need to add related code in
various places. This patch simplify the work by providing a FEATURE
table which defines the data required.
Differential Revision: https://phabricator.services.mozilla.com/D16532
The enable/disable logic of the list manager was wrong. If multiple features
shared a given table (e.g. tracking protection and tracking annotations)
and only one of them was enabled, then updates could either be disabled
or enabled depending on which feature was checked first.
By disabling everything at the beginning and selectively re-enabling tables,
we can ensure that no table gets both enabled and disabled by different
feature toggles.
Differential Revision: https://phabricator.services.mozilla.com/D3259
This makes it possible to use different lists for tracking protection
and for the features that rely on tracking annotations.
Differential Revision: https://phabricator.services.mozilla.com/D2484
This test is supposed to verify that Safe Browsing providers can
be initialized correctly even when a table is not configured
properly.
By removing a table from both google and google4, we ensure that
the test will be meaningful regardless of the stack in use.
Also filter out the console noise triggered by looking for the
update and gethash URLs of the "test" dummy provider.
MozReview-Commit-ID: KjWqSqA4FxJ
The list of sites to suppress flash infobars on should not be
downloaded from shavar unless the infobar feature is enabled.
MozReview-Commit-ID: BjkS5vWiilg
This patch was autogenerated by my decomponents.py
It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.
It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.
It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)
MozReview-Commit-ID: DeSHcClQ7cG
The list of sites to suppress flash infobars on should not be
downloaded from shavar unless the infobar feature is enabled.
MozReview-Commit-ID: BjkS5vWiilg
Download protection requires both the malware list as well as its
own special lists. The code therefore checks that both Safe
Browsing and download protection are enabled before checking
downloaded files.
The list manager should check the same prefs before downloading
any of the download protection lists in order to avoid connecting
to the Safe Browsing server when Safe Browsing is fully disabled.
MozReview-Commit-ID: 66vMA56T4pJ