add shouldShowFocusPromo or similar to BrowserUtils
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: dmosedale, Assigned: dmosedale)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
We need something very very similar to shouldShowVPNPromo for Firefox focus, but with different default lists, because the countries where it's allowed are different (everywhere except china).
We should be able to share the vast majority of the code.
Comment 1•2 years ago
|
||
shouldShowVPNPromo checks for
vpnPromoEnabled &&
!avoidAdsCountries.has(homeRegion.toLowerCase()) &&
!avoidAdsCountries.has(currentRegion.toLowerCase()) &&
inSupportedRegion &&
noActivePolicy
shouldShowFocusPromo needs all the checks except 'inSupportedRegion' https://searchfox.org/mozilla-central/source/toolkit/modules/BrowserUtils.jsm#317.
We should expose method shouldShowPromo(promoType) inside BrowserUtils that calls 'shouldShowVPNPromo' or 'shouldShowFocusPromo' based off promoType.
shouldShowPromo should be called from aboutPrivateBrowsing.js passing promoType value from config JSON (either using id or use new promoType property), replacing check shouldShowVPNPromo.
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Pushed by dmosedale@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b4d616f9657a implement shouldShowFocusPromo, r=Gijs,mviar
Comment 5•2 years ago
|
||
Backed out for bc failures on browser_backforward_userinteraction.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/c52a10ef03a3212d2dd0326b3c41d1bb39c723d2
Log link: https://treeherder.mozilla.org/logviewer?job_id=372896451&repo=autoland&lineNumber=10961
Assignee | ||
Comment 6•2 years ago
|
||
One code stanza was incorrectly deleted by my patch. I've put it back and will re-land. Sorry for the inconvenience.
Pushed by dmosedale@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e061741cd1c implement shouldShowFocusPromo, r=Gijs,mviar
Comment 8•2 years ago
|
||
bugherder |
Description
•