Commit 403a4da4 authored by Lily Chen's avatar Lily Chen Committed by Commit Bot

InlineLoginHandler: Use all-inclusive CookieOptions

This should fix a crashing CHECK in InlineLoginHandlerChromeOS::
CompleteLogin() which was checking for an oauth_code cookie that could
not be gotten with the default CookieOptions
(under SameSiteByDefaultCookies) but can be gotten using an
all-inclusive CookieOptions.

Test: On a Linux-Chromeos build, run using --login-manager, custom
--user-data-dir, and --enable-features=SameSiteByDefaultCookies. There
should not be a crash when adding a user account.

Bug: None
Change-Id: Idc54e03e704d14391840a42bad6fadc3e2d96f8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850051Reviewed-by: default avatarTien Mai <tienmai@chromium.org>
Reviewed-by: default avatarKush Sinha <sinhak@chromium.org>
Commit-Queue: Lily Chen <chlily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704300}
parent 0890a2cc
...@@ -162,11 +162,9 @@ void InlineLoginHandler::HandleCompleteLoginMessage( ...@@ -162,11 +162,9 @@ void InlineLoginHandler::HandleCompleteLoginMessage(
content::BrowserContext::GetStoragePartitionForSite( content::BrowserContext::GetStoragePartitionForSite(
contents->GetBrowserContext(), signin::GetSigninPartitionURL()); contents->GetBrowserContext(), signin::GetSigninPartitionURL());
net::CookieOptions cookie_options;
cookie_options.set_include_httponly();
partition->GetCookieManagerForBrowserProcess()->GetCookieList( partition->GetCookieManagerForBrowserProcess()->GetCookieList(
GaiaUrls::GetInstance()->gaia_url(), cookie_options, GaiaUrls::GetInstance()->gaia_url(),
net::CookieOptions::MakeAllInclusive(),
base::BindOnce(&InlineLoginHandler::HandleCompleteLoginMessageWithCookies, base::BindOnce(&InlineLoginHandler::HandleCompleteLoginMessageWithCookies,
weak_ptr_factory_.GetWeakPtr(), weak_ptr_factory_.GetWeakPtr(),
base::ListValue(args->GetList()))); base::ListValue(args->GetList())));
......
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