зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1573577 - Correctly categorize social tracking cookies in TrackingDBService. r=baku
In the content blocking log, these can be represented by different entries in the events array. Differential Revision: https://phabricator.services.mozilla.com/D41784 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
30ba1491fb
Коммит
3e16c090fe
|
@ -168,10 +168,16 @@ TrackingDBService.prototype = {
|
|||
identifyType(events) {
|
||||
let result = null;
|
||||
let isTracker = false;
|
||||
let isSocialTracker = false;
|
||||
for (let [state, blocked] of events) {
|
||||
if (state & Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT) {
|
||||
isTracker = true;
|
||||
}
|
||||
if (
|
||||
state & Ci.nsIWebProgressListener.STATE_LOADED_SOCIALTRACKING_CONTENT
|
||||
) {
|
||||
isSocialTracker = true;
|
||||
}
|
||||
if (blocked) {
|
||||
if (
|
||||
state & Ci.nsIWebProgressListener.STATE_BLOCKED_FINGERPRINTING_CONTENT
|
||||
|
@ -181,8 +187,7 @@ TrackingDBService.prototype = {
|
|||
// If STP is enabled and either a social tracker is blocked,
|
||||
// or a cookie was blocked with a social tracking event
|
||||
social_enabled &&
|
||||
((state &
|
||||
Ci.nsIWebProgressListener.STATE_LOADED_SOCIALTRACKING_CONTENT &&
|
||||
((isSocialTracker &&
|
||||
state & Ci.nsIWebProgressListener.STATE_COOKIES_BLOCKED_TRACKER) ||
|
||||
state &
|
||||
Ci.nsIWebProgressListener.STATE_BLOCKED_SOCIALTRACKING_CONTENT)
|
||||
|
|
Загрузка…
Ссылка в новой задаче