Commit 305d2848 authored by Maks Orlovich's avatar Maks Orlovich Committed by Commit Bot

CrOS cookie using things: act as first party for cookie ops.

... So that cookies accessed don't have to be marked as being OK for 3p
access once we require explicit marking for such (SameSite=none).

(The Android change also looks at HttpOnly cookies, which it didn't before,
 but that's probably OK since if you can set an HttpOnly cookie you can set
 a non-HttpOnly one).

Bug: 1015171

Change-Id: I2fcace302c272b0f08f09214ebfe72b9aee14203
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1853109Reviewed-by: default avatarAchuith Bhandarkar <achuith@chromium.org>
Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707522}
parent 521c0f9a
......@@ -49,7 +49,7 @@ bool AndroidSmsPairingStateTrackerImpl::IsAndroidSmsPairingComplete() {
void AndroidSmsPairingStateTrackerImpl::AttemptFetchMessagesPairingState() {
GetCookieManager()->GetCookieList(
GetPairingUrl(), net::CookieOptions(),
GetPairingUrl(), net::CookieOptions::MakeAllInclusive(),
base::BindOnce(&AndroidSmsPairingStateTrackerImpl::OnCookiesRetrieved,
base::Unretained(this)));
}
......
......@@ -443,11 +443,7 @@ void GaiaScreenHandler::LoadGaiaWithPartition(
GaiaUrls::GetInstance()->gaia_url(), gaps_cookie_value, base::Time::Now(),
base::nullopt /* server_time */));
net::CookieOptions options;
options.set_include_httponly();
// Permit it to set a SameSite cookie if it wants to.
options.set_same_site_cookie_context(
net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT);
const net::CookieOptions options = net::CookieOptions::MakeAllInclusive();
partition->GetCookieManagerForBrowserProcess()->SetCanonicalCookie(
*cc.get(), "https", options, std::move(callback));
}
......@@ -894,9 +890,8 @@ void GaiaScreenHandler::HandleCompleteAuthentication(
if (!partition)
return;
net::CookieOptions cookie_options;
cookie_options.set_include_httponly();
const net::CookieOptions cookie_options =
net::CookieOptions::MakeAllInclusive();
partition->GetCookieManagerForBrowserProcess()->GetCookieList(
GaiaUrls::GetInstance()->gaia_url(), cookie_options,
base::BindOnce(&GaiaScreenHandler::OnGetCookiesForCompleteAuthentication,
......
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