2020-10-08 21:54:42 +02:00
|
|
|
diff --git net/base/load_flags_list.h net/base/load_flags_list.h
|
2022-07-21 19:26:10 +02:00
|
|
|
index 96d1a51ec1078..e8120a818b1f2 100644
|
2020-10-08 21:54:42 +02:00
|
|
|
--- net/base/load_flags_list.h
|
|
|
|
+++ net/base/load_flags_list.h
|
2022-07-21 19:26:10 +02:00
|
|
|
@@ -101,3 +101,6 @@ LOAD_FLAG(RESTRICTED_PREFETCH, 1 << 15)
|
|
|
|
// is considered privileged, and therefore this flag must only be set from a
|
|
|
|
// trusted process.
|
|
|
|
LOAD_FLAG(CAN_USE_RESTRICTED_PREFETCH, 1 << 16)
|
2020-10-08 21:54:42 +02:00
|
|
|
+
|
|
|
|
+// This load will not send any cookies. For CEF usage.
|
2022-07-21 19:26:10 +02:00
|
|
|
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17)
|
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
|
2022-08-23 03:37:40 +02:00
|
|
|
index bd336369896d6..58837404660ca 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
|
2022-08-23 03:37:40 +02:00
|
|
|
@@ -1731,7 +1731,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);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool URLRequestHttpJob::IsPartitionedCookiesEnabled() 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
|
2022-07-25 19:49:32 +02:00
|
|
|
index 7e02d8c952d22..6251c2e611826 100644
|
2020-10-08 21:54:42 +02:00
|
|
|
--- services/network/public/cpp/resource_request.cc
|
|
|
|
+++ services/network/public/cpp/resource_request.cc
|
2022-07-25 19:49:32 +02:00
|
|
|
@@ -264,7 +264,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 {
|