Closed Bug 1416807 Opened 7 years ago Closed 7 years ago

Don't schedule syncs while we're behind to a captive portal

Categories

(Firefox :: Sync, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: eoger, Assigned: eoger)

References

Details

Attachments

(1 file)

I believe we have to listen to "captive-portal-login" here.
See Also: → 1416321
(In reply to Edouard Oger [:eoger] from comment #0)
> I believe we have to listen to "captive-portal-login" here.

And probably also have _checkSync look at nsICaptivePortalService.state. More generally, I think we probably want a single helper in sync that roughly means "am I online", which checks the IOService, the network link service and this captive portal service.
Assignee: nobody → eoger
Priority: -- → P2
Mocking CaptivePortalService and NetworkLinkService is a PITA, sorry :/
Comment on attachment 8928683 [details]
Bug 1416807 - Don't schedule syncs while we're behind to a captive portal.

https://reviewboard.mozilla.org/r/199928/#review205112

Thanks!

::: services/sync/modules/policies.js:139
(Diff revision 1)
> +    // Finally, if both of these services don't tell us we're offline for sure,
> +    // we'll ask the captive portal service if we are behind a locked captive
> +    // portal.
> +    //
> +    // With these 3 services combined, we believe we can avoid all false positives
> +    // and make a good guest on whether an user is online or not in most cases.

s/guest/guess/
Attachment #8928683 - Flags: review?(markh) → review+
(In reply to Edouard Oger [:eoger] from comment #3)
> Mocking CaptivePortalService and NetworkLinkService is a PITA, sorry :/

Yeah, but that's not really a big deal - IMO, the biggest risk in this that is that the real services are unreliable - which mocking in tests isn't going to help with.
Pushed by eoger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8967a5cf4c31
Don't schedule syncs while we're behind to a captive portal. r=markh
https://hg.mozilla.org/mozilla-central/rev/8967a5cf4c31
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: