fune/browser/components/urlbar/private
Drew Willcoxon 26b088f2c8 Bug 1823831 - When a VPN is active, don't fetch the weather suggestion, and re-fetch when it's disconnected. r=daisuke
This detects when the user is on a VPN and treats it the same as when the user
is offline: If a fetch is triggered, `QuickSuggest.weather.suggestion` is set to
null, and when the VPN is disconnected, a new fetch is triggered.

That means if a successful fetch happens before the user connects to the VPN,
Firefox will continue to show that accurate suggestion for the full fetch period
(30 min), even after the user connects to the VPN. The first time a fetch is
attempted while the VPN is active, the suggestion will be set to null, and
Firefox will stop showing it. Once the user turns off the VPN, a new fetch will
be triggered and the new accurate suggestion will be shown.

Unfortunately Firefox's VPN detection only works on Windows.

If you need to test weather suggestions using a VPN, you can run the following
JS in the browser console first. It will disable VPN detection.

```
QuickSuggest._test_linkService = {};
```

Differential Revision: https://phabricator.services.mozilla.com/D173232
2023-03-22 17:31:28 +00:00
..
BaseFeature.sys.mjs
BlockedSuggestions.sys.mjs
ImpressionCaps.sys.mjs Bug 1806306 - Convert AsyncShutdown imports to direct ES imports. r=mak,webdriver-reviewers,application-update-reviewers,bytesized 2022-12-23 12:37:06 +00:00
RemoteSettingsClient.sys.mjs Bug 1817038 - Move weather suggestion keywords to Nimbus. r=daisuke 2023-03-03 23:51:54 +00:00
Weather.sys.mjs Bug 1823831 - When a VPN is active, don't fetch the weather suggestion, and re-fetch when it's disconnected. r=daisuke 2023-03-22 17:31:28 +00:00