-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[beacon-api] Sends all beacons (of a document/RFH) on user navigates …
…away to a different document. This is to mitigate potential privacy issue that when network changes after users think they have left a page, beacons queued in that page still exist and get sent through the new network, which leaks navigation history to the new network. See [1] for more details. This CL adds the following changes: 1) In browser: Add a call to `PendingBeaconHost::SendAllOnPagehide()` from `RenderFrameHostManager::UnloadOldFrame()` to let old RFH send out all its pending beacons before it is put into BFCache or being unloaded. 2) In renderer: Update `PendingBeaconDispatcher` to be called on to update all its pending beacons' states before a `pagehide` event is dispatched to event listeners. This change makes `backgroundTimeout` property useless in the scenario that users navigate away to a different page. But it can still work in other cases like when tab is minimized or when switching tabs. [1]: WICG/pending-beacon#30 Bug: 1293679 Change-Id: I5a7ddf4284717e1af482286dd6f56344d4ef4b26 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3881967 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Ming-Ying Chung <mych@chromium.org> Cr-Commit-Position: refs/heads/main@{#1047323}
- Loading branch information
Showing
18 changed files
with
868 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.