Shared Storage: Support saved queries in selectURL (#48868)
We add support for saved queries, keyed by
(data_origin
, script_url
, operation_name
, query_name
).
When a named query is first invoked, the per page budgets are charged
as usual, the index result is stored for later in case the query is
reused from the same page.
On query reuse, the previously calculated and stored index result
will be used to select the URL at that index in the current list, and
the per page budgets will not be re-charged.
When the page is destroyed, all associated saved queries are also
destroyed.
See explainer update at
WICG/shared-storage#176
and spec updates at
WICG/shared-storage#188
WICG/shared-storage#202
Bug: 367440966
Change-Id: I89fd7e65cd14c9d60d6ac53906f95593a2259a37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5868889
Reviewed-by: Ken Buchanan kenrb@chromium.org
Reviewed-by: Yao Xiao yaoxia@chromium.org
Commit-Queue: Cammie Smith Barnes cammie@chromium.org
Cr-Commit-Position: refs/heads/main@{#1375507}
Co-authored-by: Camillia Smith Barnes cammie@chromium.org