2020-10-08 21:54:42 +02:00
|
|
|
diff --git net/base/load_flags_list.h net/base/load_flags_list.h
|
2024-08-26 14:44:25 +02:00
|
|
|
index aeb79b46f5d21..bd57e874c1240 100644
|
2020-10-08 21:54:42 +02:00
|
|
|
--- net/base/load_flags_list.h
|
|
|
|
+++ net/base/load_flags_list.h
|
2024-01-26 03:12:43 +01:00
|
|
|
@@ -115,3 +115,6 @@ LOAD_FLAG(DISABLE_SHARED_DICTIONARY_AFTER_CROSS_ORIGIN_REDIRECT, 1 << 18)
|
2023-11-21 20:17:55 +01:00
|
|
|
// This flag is used to bypass HSTS upgrades. This flag must be set for AIA,
|
|
|
|
// CRL, and OCSP requests in order to prevent circular dependencies.
|
|
|
|
LOAD_FLAG(SHOULD_BYPASS_HSTS, 1 << 19)
|
2020-10-08 21:54:42 +02:00
|
|
|
+
|
|
|
|
+// This load will not send any cookies. For CEF usage.
|
2023-11-21 20:17:55 +01:00
|
|
|
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 20)
|
2020-10-08 21:54:42 +02:00
|
|
|
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
|
2024-09-27 16:15:44 +02:00
|
|
|
index 60a3db0490f57..2183142341991 100644
|
2020-10-08 21:54:42 +02:00
|
|
|
--- net/url_request/url_request_http_job.cc
|
|
|
|
+++ net/url_request/url_request_http_job.cc
|
2024-09-27 16:15:44 +02:00
|
|
|
@@ -2074,7 +2074,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
|
2020-10-08 21:54:42 +02:00
|
|
|
// Read cookies whenever allow_credentials() is true, even if the PrivacyMode
|
|
|
|
// is being overridden by NetworkDelegate and will eventually block them, as
|
|
|
|
// blocked cookies still need to be logged in that case.
|
2022-02-21 23:23:40 +01:00
|
|
|
- return request_->context()->cookie_store() && request_->allow_credentials();
|
|
|
|
+ return request_->context()->cookie_store() && request_->allow_credentials() &&
|
|
|
|
+ !(request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES);
|
|
|
|
}
|
|
|
|
|
2023-12-06 21:16:15 +01:00
|
|
|
bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const {
|
2020-10-08 21:54:42 +02:00
|
|
|
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
|
2024-09-27 16:15:44 +02:00
|
|
|
index 28bf295032c89..e625f00f49603 100644
|
2020-10-08 21:54:42 +02:00
|
|
|
--- services/network/public/cpp/resource_request.cc
|
|
|
|
+++ services/network/public/cpp/resource_request.cc
|
2024-09-27 16:15:44 +02:00
|
|
|
@@ -324,7 +324,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
2020-10-08 21:54:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool ResourceRequest::SendsCookies() const {
|
|
|
|
- return credentials_mode == network::mojom::CredentialsMode::kInclude;
|
|
|
|
+ return credentials_mode == network::mojom::CredentialsMode::kInclude &&
|
|
|
|
+ !(load_flags & net::LOAD_DO_NOT_SEND_COOKIES);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool ResourceRequest::SavesCookies() const {
|