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

Create IsolationInfo with the existing values.

Use the existing origin, site_for_cookies and top_frame_origin values
to create an IsolationInfo object to pass into RestrictedCookieManager,
which is more aligned with the original behavior
(before https://crrev.com/c/2582608) where those three fields were
passed into RestrictedCookieManager directly.

Bug: 1166328
Change-Id: Id44edf91f15fc8fde93c483d3b4ed2fb25c02548
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2630370Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Commit-Queue: Shuran Huang <shuuran@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844153}
parent 21c5146e
......@@ -51,16 +51,9 @@ GetRestrictedCookieManagerForContext(
StoragePartition* storage_partition =
BrowserContext::GetDefaultStoragePartition(browser_context);
net::IsolationInfo isolation_info =
render_frame_host
? render_frame_host->GetIsolationInfoForSubresources()
: net::IsolationInfo::Create(net::IsolationInfo::RequestType::kOther,
top_frame_origin, origin,
site_for_cookies, base::nullopt);
DCHECK_EQ(origin, isolation_info.frame_origin().value());
DCHECK_EQ(top_frame_origin, isolation_info.top_frame_origin().value());
// TODO(https://crbug.com/911299): Check `site_for_cookies` and
// `isolation_info.site_for_cookies` are equivalent.
net::IsolationInfo isolation_info = net::IsolationInfo::Create(
net::IsolationInfo::RequestType::kOther, top_frame_origin, origin,
site_for_cookies, base::nullopt);
mojo::PendingRemote<network::mojom::RestrictedCookieManager> pipe;
static_cast<StoragePartitionImpl*>(storage_partition)
......
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