Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick of https://crrev.com/c/3666357 into M103
Reland "Implement new design for CHIPS OT and delete old design" This is a reland of commit 5f95d48 Original change's description: > Implement new design for CHIPS OT and delete old design > > This CL deletes the client hint-based origin trial design which I > landed in https://crrev.com/c/3453430. > > It also implements the new origin trial design announced here: > privacysandbox/privacy-sandbox-dev-support#33 > > The new origin trial design only checks the Origin-Trial header when an > HTTP response has a Set-Cookie header with a Partitioned attribute in > the cookie line. The resulting cookie from the Set-Cookie with > Partitioned does NOT have to be valid. > > In order to do this, I added a new field, has_partitioned_cookie, to > URLResponseHead. This bit indicates to the browser/renderer that the > response had a Set-Cookie header with Partitioned. > > The network service has no idea if the site is in the OT at request > time, so we will set any cookie with the Partitioned attribute as > partitioned even if the site is not in the OT. > > Afterwards, we then check the Origin-Trial header and token in the > browser for navigation requests and the renderer for subresource > requests. If a site is not a valid OT participant, we convert that > URL's partitioned cookies to unpartitioned. > > In order to do this in the renderer, we had to give > RestrictedCookieManager the ability to change any URL's partitioned > cookies to unpartitioned. Since unpartitioned cookies are already the > state of the art for the web, it's low risk to give renderers this > ability. RCM's ability to do this will be temporary and only for the > duration of the OT. > > The entire feature is tested end-to-end in > navigation_request_browsertest.cc for now. > > Bug: 1296161,1327045 > Change-Id: I08490a7df4cbb93e121034d67b88ce4a69f32c37 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3650844 > Reviewed-by: Yutaka Hirano <yhirano@chromium.org> > Reviewed-by: Maks Orlovich <morlovich@chromium.org> > Reviewed-by: Nate Fischer <ntfschr@chromium.org> > Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> > Reviewed-by: Ari Chivukula <arichiv@chromium.org> > Reviewed-by: Daniel Cheng <dcheng@chromium.org> > Reviewed-by: Philip Rogers <pdr@chromium.org> > Commit-Queue: Dylan Cutler <dylancutler@google.com> > Cr-Commit-Position: refs/heads/main@{#1007159} (cherry picked from commit 196d0a9) Bug: 1296161,1327045 Change-Id: I1f73a4ff04121d14a2ae8eb91f3f8e3aed9068f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3666357 Reviewed-by: Maks Orlovich <morlovich@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Commit-Queue: Dylan Cutler <dylancutler@google.com> Reviewed-by: Philip Rogers <pdr@chromium.org> Reviewed-by: Victor Tan <victortan@chromium.org> Reviewed-by: Michael Bai <michaelbai@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1007601} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3679821 Owners-Override: Krishna Govind <govind@chromium.org> Reviewed-by: Krishna Govind <govind@chromium.org> Cr-Commit-Position: refs/branch-heads/5060@{#439} Cr-Branched-From: b83393d-refs/heads/main@{#1002911}
- Loading branch information