Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit d56e33d

Browse files
committed
Bug 1669731 - P1. Rename STATE_UNBLOCKED_UNSAFE_CONTENT to STATE_UNBLOCKED_TRACKING_CONTENT r=timhuang
unsafe content is for Safe Browsing(phishing, malware, etc), we should use tracking content instead. Differential Revision: https://phabricator.services.mozilla.com/D93269
1 parent 2798413 commit d56e33d

7 files changed

Lines changed: 14 additions & 10 deletions

browser/base/content/browser-siteProtections.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ var Fingerprinting = {
110110

111111
isShimming(state) {
112112
return (
113-
state & Ci.nsIWebProgressListener.STATE_UNBLOCKED_UNSAFE_CONTENT &&
113+
state & Ci.nsIWebProgressListener.STATE_UNBLOCKED_TRACKING_CONTENT &&
114114
this.isAllowing(state)
115115
);
116116
},
@@ -256,7 +256,7 @@ var Cryptomining = {
256256

257257
isShimming(state) {
258258
return (
259-
state & Ci.nsIWebProgressListener.STATE_UNBLOCKED_UNSAFE_CONTENT &&
259+
state & Ci.nsIWebProgressListener.STATE_UNBLOCKED_TRACKING_CONTENT &&
260260
this.isAllowing(state)
261261
);
262262
},
@@ -466,7 +466,7 @@ var TrackingProtection = {
466466

467467
isShimming(state) {
468468
return (
469-
state & Ci.nsIWebProgressListener.STATE_UNBLOCKED_UNSAFE_CONTENT &&
469+
state & Ci.nsIWebProgressListener.STATE_UNBLOCKED_TRACKING_CONTENT &&
470470
this.isAllowing(state)
471471
);
472472
},
@@ -1134,7 +1134,7 @@ var SocialTracking = {
11341134

11351135
isShimming(state) {
11361136
return (
1137-
state & Ci.nsIWebProgressListener.STATE_UNBLOCKED_UNSAFE_CONTENT &&
1137+
state & Ci.nsIWebProgressListener.STATE_UNBLOCKED_TRACKING_CONTENT &&
11381138
this.isAllowing(state)
11391139
);
11401140
},

netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ UrlClassifierFeatureCryptominingProtection::ProcessChannel(
146146
if (ChannelClassifierService::OnBeforeBlockChannel(aChannel, mName, list) ==
147147
ChannelBlockDecision::Unblocked) {
148148
ContentBlockingNotifier::OnEvent(
149-
aChannel, nsIWebProgressListener::STATE_UNBLOCKED_UNSAFE_CONTENT,
149+
aChannel, nsIWebProgressListener::STATE_UNBLOCKED_TRACKING_CONTENT,
150150
false);
151151
*aShouldContinue = true;
152152
return NS_OK;

netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ UrlClassifierFeatureFingerprintingProtection::ProcessChannel(
153153
if (ChannelClassifierService::OnBeforeBlockChannel(aChannel, mName, list) ==
154154
ChannelBlockDecision::Unblocked) {
155155
ContentBlockingNotifier::OnEvent(
156-
aChannel, nsIWebProgressListener::STATE_UNBLOCKED_UNSAFE_CONTENT,
156+
aChannel, nsIWebProgressListener::STATE_UNBLOCKED_TRACKING_CONTENT,
157157
false);
158158
*aShouldContinue = true;
159159
return NS_OK;

netwerk/url-classifier/UrlClassifierFeatureSocialTrackingProtection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ UrlClassifierFeatureSocialTrackingProtection::ProcessChannel(
149149
if (ChannelClassifierService::OnBeforeBlockChannel(aChannel, mName, list) ==
150150
ChannelBlockDecision::Unblocked) {
151151
ContentBlockingNotifier::OnEvent(
152-
aChannel, nsIWebProgressListener::STATE_UNBLOCKED_UNSAFE_CONTENT,
152+
aChannel, nsIWebProgressListener::STATE_UNBLOCKED_TRACKING_CONTENT,
153153
false);
154154
*aShouldContinue = true;
155155
return NS_OK;

netwerk/url-classifier/UrlClassifierFeatureTrackingProtection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ UrlClassifierFeatureTrackingProtection::ProcessChannel(
153153
if (ChannelClassifierService::OnBeforeBlockChannel(aChannel, mName, list) ==
154154
ChannelBlockDecision::Unblocked) {
155155
ContentBlockingNotifier::OnEvent(
156-
aChannel, nsIWebProgressListener::STATE_UNBLOCKED_UNSAFE_CONTENT,
156+
aChannel, nsIWebProgressListener::STATE_UNBLOCKED_TRACKING_CONTENT,
157157
false);
158158
*aShouldContinue = true;
159159
return NS_OK;

toolkit/components/antitracking/ContentBlockingLog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Maybe<uint32_t> ContentBlockingLog::RecordLogParent(
158158
aTrackingFullHashes);
159159
break;
160160

161-
case nsIWebProgressListener::STATE_UNBLOCKED_UNSAFE_CONTENT:
161+
case nsIWebProgressListener::STATE_UNBLOCKED_TRACKING_CONTENT:
162162
RecordLogInternal(aOrigin, aType, blockedValue);
163163
break;
164164

uriloader/base/nsIWebProgressListener.idl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,10 @@ interface nsIWebProgressListener : nsISupports
332332
*
333333
* STATE_LOADED_SOCIALTRACKING_CONTENT
334334
* SocialTracking content has been loaded.
335+
*
336+
* STATE_UNBLOCKED_TRACKING_CONTENT
337+
* Tracking content should be blocked from loading was unblocked.
338+
*
335339
*/
336340
const unsigned long STATE_BLOCKED_TRACKING_CONTENT = 0x00001000;
337341
const unsigned long STATE_LOADED_LEVEL_1_TRACKING_CONTENT = 0x00002000;
@@ -352,7 +356,7 @@ interface nsIWebProgressListener : nsISupports
352356
const unsigned long STATE_COOKIES_BLOCKED_FOREIGN = 0x00000080;
353357
const unsigned long STATE_BLOCKED_SOCIALTRACKING_CONTENT = 0x00010000;
354358
const unsigned long STATE_LOADED_SOCIALTRACKING_CONTENT = 0x00020000;
355-
const unsigned long STATE_UNBLOCKED_UNSAFE_CONTENT = 0x00000010;
359+
const unsigned long STATE_UNBLOCKED_TRACKING_CONTENT = 0x00000010;
356360

357361
/**
358362
* Flag for HTTPS-Only Mode upgrades

0 commit comments

Comments
 (0)