mirror of
https://github.com/aphrody-labs/cef.git
synced 2026-10-13 21:07:07 +00:00
- Windows SDK 10.0.28000.2270 is now required - CefRegisterExtension is deprecated due to https://crbug.com/40347662
51 lines
2.6 KiB
Diff
51 lines
2.6 KiB
Diff
diff --git net/base/load_flags_list.h net/base/load_flags_list.h
|
|
index c10df92f30b1292a8243f376025e81afcefba78d..17abc3e15b985a13308014488728fcb0af188f18 100644
|
|
--- net/base/load_flags_list.h
|
|
+++ net/base/load_flags_list.h
|
|
@@ -123,4 +123,7 @@ LOAD_FLAG(SHOULD_BYPASS_HSTS, 1 << 18)
|
|
// compromised renderer concern is acceptable.
|
|
LOAD_FLAG(IS_MAIN_FRAME_ORIGIN_RECENTLY_ACCESSED, 1 << 19)
|
|
|
|
+// This load will not send any cookies. For CEF usage.
|
|
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 20)
|
|
+
|
|
// See note at top of file about why adding LoadFlags is often a bad idea.
|
|
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
|
|
index 30923eb35ebfb7c7a27370b920519228e7b880e5..1991c66f497af1a2b22d8ac91d332ca0def5518a 100644
|
|
--- net/url_request/url_request_http_job.cc
|
|
+++ net/url_request/url_request_http_job.cc
|
|
@@ -2144,7 +2144,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
|
|
// 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.
|
|
- 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::ShouldRecordPartitionedCookieUsage() const {
|
|
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
|
|
index 8a8e9165fa604bca66ddbf48d569d277c4b6aa96..42d8c636ab7f0442d6f57ad512e83cb27e0197a7 100644
|
|
--- services/network/public/cpp/resource_request.cc
|
|
+++ services/network/public/cpp/resource_request.cc
|
|
@@ -394,7 +394,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
|
}
|
|
|
|
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 {
|
|
@@ -448,7 +449,8 @@ int GetAllowedLoadFlagsForUntrustedRequests() {
|
|
net::LOAD_DISABLE_CACHE | net::LOAD_PREFETCH |
|
|
net::LOAD_IGNORE_LIMITS | net::LOAD_DO_NOT_USE_EMBEDDED_IDENTITY |
|
|
net::LOAD_SUPPORT_ASYNC_REVALIDATION |
|
|
- net::LOAD_RESTRICTED_PREFETCH_FOR_MAIN_FRAME;
|
|
+ net::LOAD_RESTRICTED_PREFETCH_FOR_MAIN_FRAME |
|
|
+ net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES;
|
|
}
|
|
|
|
namespace debug {
|