Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a global singleton instance of referrals list everywhere #3206

Open
iefremov opened this issue Feb 4, 2019 · 1 comment
Open

Use a global singleton instance of referrals list everywhere #3206

iefremov opened this issue Feb 4, 2019 · 1 comment
Assignees

Comments

@iefremov
Copy link
Contributor

iefremov commented Feb 4, 2019

Follow-up for #3176
BraveNetworkDelegateBase listens for updates of the referral headers list, but this is actually not needed. Since the list is a global for the whole app we can just get it when needed.

This way, we can remove unsafe usages of base::Unretained in BraveNetworkDelegateBase. To safely get the list on IO thread, I'd suggest to keep a copy of a the list (or a single instance if nobody wants it on other threads) and atomically update this copy during updates

Brave version (brave://version info)

Brave 0.62.0 Chromium: 72.0.3626.71 (Developer Build) (64-bit)
Revision f52ccad2a6a3c65fc9e0c591a517ceab1198dac0-refs/branch-heads/3626@{#763}

.

@iefremov iefremov added this to the 1.x Backlog milestone Feb 4, 2019
@iefremov iefremov self-assigned this Feb 4, 2019
@iefremov
Copy link
Contributor Author

iefremov commented Feb 4, 2019

@bbondy @emerick @bridiver FYI

@rebron rebron removed this from the 1.x Backlog milestone Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants