Commit 513226bd authored by Shuran Huang's avatar Shuran Huang Committed by Chromium LUCI CQ

Set full_party_context_size in CookieOptions.

Bug: 1136102
Change-Id: I6fe26dbf5f0c83672136aebe8f4a50846b4cc559
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633347Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Shuran Huang <shuuran@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844192}
parent b04d00de
......@@ -63,6 +63,11 @@ net::CookieOptions MakeOptionsForSet(
options.set_same_party_cookie_context_type(
net::cookie_util::ComputeSamePartyContext(request_site, isolation_info,
cookie_access_delegate));
if (isolation_info.party_context().has_value()) {
// Count the top-frame site since it's not in the party_context.
options.set_full_party_context_size(isolation_info.party_context()->size() +
1);
}
bool is_in_nontrivial_first_party_set =
cookie_access_delegate &&
cookie_access_delegate->IsInNontrivialFirstPartySet(request_site);
......@@ -101,6 +106,11 @@ net::CookieOptions MakeOptionsForGet(
options.set_same_party_cookie_context_type(
net::cookie_util::ComputeSamePartyContext(request_site, isolation_info,
cookie_access_delegate));
if (isolation_info.party_context().has_value()) {
// Count the top-frame site since it's not in the party_context.
options.set_full_party_context_size(isolation_info.party_context()->size() +
1);
}
bool is_in_nontrivial_first_party_set =
cookie_access_delegate &&
cookie_access_delegate->IsInNontrivialFirstPartySet(request_site);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment