Closed Bug 1873490 Opened 2 years ago Closed 2 years ago

Remove StorageDisabledByAntitracking Functions to Simplify StorageAccess helpers

Categories

(Core :: Privacy: Anti-Tracking, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: bvandersloot, Assigned: bvandersloot)

References

Details

Attachments

(3 files)

Found this as a refactor that will make things a little clearer in the short term before we solve Bug 1765334 by adding a StorageKey.

I'm considering dropping this if statement entirely because this is only hit when we disable network state partitioning.
According to code coverage, we only see the ""_ns as the result of this ternary in our testing too.

But, if you disable network state partitioning and then block cookies from a given domain, then we would still want to partition network state I suppose, so I'll leave it like this..

Assignee: nobody → bvandersloot
Status: NEW → ASSIGNED

This makes the single remaining function larger, but makes things much easier to read to my eyes and reuses the branches that exist instead of mirroring them in both functions

Depends on D198034

Similarly to part 2, this makes one function bigger, but removes a funciton.

IMO the "and then do more stuff" helper call at the end of a function without a clear separation/purpose and no other callsites
mostly makes the code harder to reason about. Especially when that helper is exported in the header so you can't tell at a
glance that there aren't other callers.

Depends on D198035

See Also: → 1874416
Pushed by bvandersloot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f720e27569ad part 1 - Refactor the only external call to StorageDisabledByAntiTracking - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/1dbd7bc7c9f2 part 2 - Refactor StorageDisabledByAntiTrackingInternal away by coalescing it into StorageDisabledByAntiTracking - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/357d024bdffa part 3 - Refactor StorageDisabledByAntiTracking away by coalescing it into InternalStorageAllowedCheck - r=anti-tracking-reviewers,timhuang
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: