Closed Bug 2022587 Opened 2 months ago Closed 2 months ago

Refresh the bandwidth usage when IPPProxyManager stops

Categories

(Firefox :: IP Protection, task, P2)

task
Points:
3

Tracking

()

VERIFIED FIXED
150 Branch
Tracking Status
firefox149 --- verified
firefox150 --- verified

People

(Reporter: fchasen, Assigned: fchasen)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fx-vpn])

Attachments

(3 files, 1 obsolete file)

We should check the usage when the proxy is stopped so that we get the most up to date amount used.

This could be tricky when we stop automatically at shutdown, so we might want to limit it to just when a user action is taken.

Assignee: nobody → rking
Summary: Checking the bandwidth usage when IPPProxyManager stops → Refresh the bandwidth usage when IPPProxyManager stops

Calls refreshUsage when stop is called from a user action. If in the paused state, there is no need to check as the refresh is already scheduled.

Assignee: rking → fchasen
Status: NEW → ASSIGNED
Attachment #9552352 - Attachment is obsolete: true
Pushed by fchasen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0253425111de https://hg.mozilla.org/integration/autoland/rev/c97694c45dae Refresh the bandwidth usage when IPPProxyManager is stopped. r=ip-protection-reviewers,rking
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch

Is there something QA needs to verify here? Thank you!

Flags: needinfo?(fchasen)

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Fixes bugs found with the bandwidth usage in the IPP proxy, without which the behavior will be inconsistent for users who use all their available bandwidth in the VPN.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Small bug fixes limited to the VPN proxy handling of bandwidth usage.
  • String changes made/needed?: None
  • Is Android affected?: no
Attachment #9553748 - Flags: approval-mozilla-beta?

Calls refreshUsage when stop is called from a user action. If in the paused state, there is no need to check as the refresh is already scheduled.

Original Revision: https://phabricator.services.mozilla.com/D287457

Attachment #9553748 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

It will be a bit tricky to test, as you'll need to wait to have bandwidth usage reported but not wait so long that it updates in the panel (~18mins) before you turn the VPN off.

  1. Turn on the VPN
  2. Note the current bandwidth used
  3. Use at-least 1 gig of bandwidth
  4. Wait more than 5 but less than 10 minutes for best chance of getting the timing right
  5. Turn off the VPN
  6. Bandwidth in the panel should update shortly after
Flags: needinfo?(fchasen)
Attached image image (50).png

Verified this using Fireofx Nightly 150.0a1 (18-03-2026) on Windows 11.
Performing above steps and

  • downloaded 1 GB file - trigger bandwidth reset shortly after turning VPN off - to 2GB.
  • downloaded 2 GB file imediatelly after - waited 7 minutes and I got the usage updated without turning the VPN OFF (+infobar and warning). Turning off the VPN triggered the usage to be 2GB again. (see ss)
Flags: needinfo?(fchasen)

Thanks, I don’t know that we’ll be able to meaningfully tests this with real usage. I’ll see if I can get the timing down but it might be better to manually set the usage to something and then check that it updates back to the correct amount for now?

Flags: needinfo?(fchasen)

Better to have it tested by manually setting the usage to something, than not testing this at all.

QA Whiteboard: [qa-triage-done-c150/b149]

Verified this using Firefox Beta 149.0b10 on macOS 26.
We altered the value of the "browser.ipprotection.usageCache" pref ("remaining": "2412808920" changed to "1073741824") and at VPN turn OFF the pref is changed to its initial value.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: