96b32a814c
* chore: bump chromium in DEPS to 2930eb12d56988c2c80bad2797ab036fe493d4e1 * chore: update patches * Revert "disable robotjs-based tests" This reverts commite56adafc1f
. * Revert "skip dbus tests (#18409)" This reverts commitaea042cc83
. * Revert "skip more dbus tests" This reverts commit68dbef48da
. * chore: bump chromium in DEPS to fd62da5601399b92effaa32a943fcd96143c8605 * chore: bump chromium in DEPS to 99f87ca22ee6e7ec953defe694771cb68f47a596 * chore: bump chromium in DEPS to d88778435b4cd9a510a63385b6d4ba24674b9774 * chore: update patches * chore: update ssl_security_state_tab_helper.patch * Remove content_packaged_services https://chromium-review.googlesource.com/c/chromium/src/+/1604203 * chore: fix false positive lint error * views: wireup widget name to crash data https://chromium-review.googlesource.com/c/chromium/src/+/1626640 * chore: bump chromium in DEPS to ab588d36191964c4bca8de5c320534d95606c861 * roll patches
52 lines
2.4 KiB
Diff
52 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: deepak1556 <hop2deep@gmail.com>
|
|
Date: Thu, 15 Nov 2018 22:04:34 +0530
|
|
Subject: cross_site_document_resource_handler.patch
|
|
|
|
Add a content layer hook to disable CORB for a renderer process,
|
|
this patch can be removed once we switch to network service,
|
|
where the embedders have a chance to design their URLLoaders.
|
|
|
|
diff --git a/content/browser/loader/cross_site_document_resource_handler.cc b/content/browser/loader/cross_site_document_resource_handler.cc
|
|
index 2151c5b9698e9a2768875d04a2297956cc4c0d41..8a316a117ab367bcbac947894cbe1bc2428de93e 100644
|
|
--- a/content/browser/loader/cross_site_document_resource_handler.cc
|
|
+++ b/content/browser/loader/cross_site_document_resource_handler.cc
|
|
@@ -671,6 +671,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders(
|
|
return false;
|
|
}
|
|
|
|
+ if (GetContentClient()->browser()->ShouldBypassCORB(info->GetChildID()))
|
|
+ return false;
|
|
+
|
|
return true;
|
|
}
|
|
|
|
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
|
index 2317ddf6a3c533f701fe44bf1b8114eb042c2189..9a823a98175c33c84b8d44a95c9d7d44568807ca 100644
|
|
--- a/content/public/browser/content_browser_client.cc
|
|
+++ b/content/public/browser/content_browser_client.cc
|
|
@@ -61,6 +61,10 @@ ContentBrowserClient::SiteInstanceForNavigationType ContentBrowserClient::Should
|
|
return SiteInstanceForNavigationType::ASK_CHROMIUM;
|
|
}
|
|
|
|
+bool ContentBrowserClient::ShouldBypassCORB(int render_process_id) const {
|
|
+ return false;
|
|
+}
|
|
+
|
|
BrowserMainParts* ContentBrowserClient::CreateBrowserMainParts(
|
|
const MainFunctionParams& parameters) {
|
|
return nullptr;
|
|
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
|
index a81f40507b2233c3bde03b940cccd6be0aaa4926..1a208d24bae80277e4a60f4180bb7f95c38561ce 100644
|
|
--- a/content/public/browser/content_browser_client.h
|
|
+++ b/content/public/browser/content_browser_client.h
|
|
@@ -242,6 +242,9 @@ class CONTENT_EXPORT ContentBrowserClient {
|
|
content::RenderFrameHost* rfh,
|
|
content::SiteInstance* pending_site_instance) {}
|
|
|
|
+ // Electron: Allows bypassing CORB checks for a renderer process.
|
|
+ virtual bool ShouldBypassCORB(int render_process_id) const;
|
|
+
|
|
// Allows the embedder to set any number of custom BrowserMainParts
|
|
// implementations for the browser startup code. See comments in
|
|
// browser_main_parts.h.
|