Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Fix #186: Enable event telemetry and price polling in certain privacy contexts #270

Merged
merged 2 commits into from
Nov 16, 2018

Conversation

biancadanforth
Copy link
Collaborator

I left shouldUpdatePrices as a stub for now in anticipation of the fix for #177 .

…ontexts

In order to avoid the eslint `no-cycle` error, I moved all events to be registered to their own `events.js` script, so that both `privacy.js` and `extension.js` could import from `events.js`. (thanks Osmose for the idea)

More about the `no-cycle` error that was avoided: This error came up when I tried to import CATEGORY_3_EVENTS from `./src/telemetry/extension.js` into `./src/privacy.js`, since we were already importing `shouldCollectTelemetry` from the latter into the former.
Previously, price polling (a.k.a. background price updates) was disabled when Do Not Track, Tracking Protection or certain cookie settings ('reject_third_party' and 'reject_all') were enabled.

Now, price polling occurs in these situations. This leaves the `shouldUpdatePrices` function in `privacy.js` kind of useless, but I left it there instead of removing it entirely in order to add the Private Browsing check that is part of mozilla#177.
@biancadanforth
Copy link
Collaborator Author

@Osmose Ready for your review!

Copy link
Contributor

@Osmose Osmose left a comment

Choose a reason for hiding this comment

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

@biancadanforth biancadanforth merged commit c04cb82 into mozilla:master Nov 16, 2018
@biancadanforth biancadanforth deleted the 186-more-data branch November 16, 2018 16:32
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.

2 participants