Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Fixes #2424 Enhanced Tracking Protection #3037

Merged
merged 2 commits into from
Mar 26, 2020
Merged

Fixes #2424 Enhanced Tracking Protection #3037

merged 2 commits into from
Mar 26, 2020

Conversation

keianhzo
Copy link
Contributor

Fixes #2424 Enhanced Tracking Protection

@keianhzo keianhzo self-assigned this Mar 24, 2020
@keianhzo
Copy link
Contributor Author

keianhzo commented Mar 24, 2020

There are a few common issues with the WebXR settings PR:

  • Dialog not closed when switching windows
  • Dialog not closed when clicking on the button again
  • Hide buttons in the content feed.

I'll fix those when I rebase this one with the pending PRs.

Comment on lines 28 to 32
.antiTracking(ContentBlocking.AntiTracking.AD or ContentBlocking.AntiTracking.SOCIAL or ContentBlocking.AntiTracking.ANALYTIC)
.antiTracking(
ContentBlocking.AntiTracking.AD or
ContentBlocking.AntiTracking.SOCIAL or
ContentBlocking.AntiTracking.ANALYTIC)
.enhancedTrackingProtectionLevel(SettingsStore.getInstance(context).trackingProtectionLevel)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we only want one or the other set at one time?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are independent, actually. antiTracking controls what content gets blocked when GeckoSessionSettings.useTrackingProtection is true, while enhancedTrackingProtectionLevel controls what cookies get blocked when our cookie behavior is ACCEPT_NON_TRACKERS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way I understood what was explained to me is that we only want one active at a time. If we are blocking cookies we don't want to be blocking content as that is the purpose of ETP, it just blocks the tracking cookies and the content is all loaded which reduce breakage, where content blocking is more strict but also causes more breakage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are independent, actually. antiTracking controls what content gets blocked when GeckoSessionSettings.useTrackingProtection is true, while enhancedTrackingProtectionLevel controls what cookies get blocked when our cookie behavior is ACCEPT_NON_TRACKERS.

@droeh I guess I'm still confused, I don't see GeckoSessionSettings.useTrackingProtection() except when the session is created. Does this mean it never gets turned off?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slow reponse, I'm not used to getting work mail from github!
There are cases where you might want to leave ETP and TP both enabled, for example you may want to enable TP only for one category and ETP for the rest. In general they are only exposed in UI mutually exclusively, though (eg as "Standard" and "Strict" in desktop).

And yeah, I missed that, but you definitely need to update GeckoSessionSettings.useTrackingProtection() to control TP, and do it for every session. (Yes, that sucks, it's on the list of things to change in the API.)

I'll keep an eye on github mail and respond quicker if you have any more questions.

Copy link

@droeh droeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tracking protection related stuff looks good to me.

Comment on lines 28 to 32
.antiTracking(ContentBlocking.AntiTracking.AD or ContentBlocking.AntiTracking.SOCIAL or ContentBlocking.AntiTracking.ANALYTIC)
.antiTracking(
ContentBlocking.AntiTracking.AD or
ContentBlocking.AntiTracking.SOCIAL or
ContentBlocking.AntiTracking.ANALYTIC)
.enhancedTrackingProtectionLevel(SettingsStore.getInstance(context).trackingProtectionLevel)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are independent, actually. antiTracking controls what content gets blocked when GeckoSessionSettings.useTrackingProtection is true, while enhancedTrackingProtectionLevel controls what cookies get blocked when our cookie behavior is ACCEPT_NON_TRACKERS.

@bluemarvin
Copy link
Contributor

@keianhzo droeh says this is the site to use for testing: https://senglehardt.com/test/trackingprotection/test_pages/

@keianhzo
Copy link
Contributor Author

keianhzo commented Mar 25, 2020

@bluemarvin @droeh I've rebased and removed all redundant code. I've been testing with the site above and I think the results are good, also are the sames as Fenix.

@bluemarvin
Copy link
Contributor

bluemarvin commented Mar 25, 2020

Seems to work from my testing. It would be nice if we could do a v2 where the shield changed colors when it actually blocks some thing and then clicking on that would give more details on what was blocked.

Copy link
Contributor

@bluemarvin bluemarvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'm not sure it is actually working:
I turned off tracking protection:
Screenshot_org mozilla vrbrowser_2020 03 25-20 19 49
But it says tracking protection is still on and cookies are still getting blocked:
Screenshot_org mozilla vrbrowser_2020 03 25-20 19 33

@bluemarvin
Copy link
Contributor

I wonder if we should even show the shield if tracking protection is turned off.

@keianhzo
Copy link
Contributor Author

keianhzo commented Mar 26, 2020

@bluemarvin Regarding:

But it says tracking protection is still on and cookies are still getting blocked:

I see the same behavior in Fenix, maybe @droeh can clarify.

And regarding:

I wonder if we should even show the shield if tracking protection is turned off.

I'll look into that tomorrow

@keianhzo
Copy link
Contributor Author

@bluemarvin updated with hiding the tracking protection icon if disabled.

@keianhzo keianhzo requested a review from bluemarvin March 26, 2020 10:53
Copy link
Contributor

@bluemarvin bluemarvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will file follow up for GV issue https://bugzilla.mozilla.org/show_bug.cgi?id=1625210

@bluemarvin
Copy link
Contributor

bluemarvin commented Mar 26, 2020

Follow up issue #3053

@bluemarvin bluemarvin merged commit 97b2c5e into master Mar 26, 2020
@bluemarvin bluemarvin deleted the v10/etp branch March 26, 2020 17:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update ETP
3 participants