Commit 4bfb12f4 authored by Steven Bingler's avatar Steven Bingler Committed by Chromium LUCI CQ

Stop CookieMonster from setting source scheme

With the constructor use of CanonicallCookie greatly reduced (with
ongoing work to privatize the constructor) CookieMonster no longer
needs to set the source scheme of a cookie.

This change will fix a bug in which cookies set by DevTools always
get ovewritten with a "Secure" scheme regardless which sourceScheme
they entered the CookieMonster with.

Bug: 1031721
Change-Id: I58d9a938755bc04b085f4a6b6279bd4898e1d1b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2590016Reviewed-by: default avatarMaksim Orlovich <morlovich@chromium.org>
Commit-Queue: Steven Bingler <bingler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837574}
parent ce3af654
......@@ -1176,12 +1176,6 @@ void CookieMonster::SetCanonicalCookie(std::unique_ptr<CanonicalCookie> cc,
CookieAccessResult access_result;
// TODO(morlovich): This is only needed becausea a bunch of spots don't set it
// consistently on construction.
cc->SetSourceScheme(source_url.SchemeIsCryptographic()
? net::CookieSourceScheme::kSecure
: net::CookieSourceScheme::kNonSecure);
bool delegate_treats_url_as_trustworthy =
cookie_access_delegate() &&
cookie_access_delegate()->ShouldTreatUrlAsTrustworthy(source_url);
......
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