Skip to content

Commit

Permalink
C88 patches upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Dec 11, 2020
1 parent 3482ddd commit 454244f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index f6aa62ef25246bca0ab4e5eca1319a712e671692..636945bf0f24cb21d83b00738bc9f96c38bcc428 100644
index 74e88bc6cfd786faee416e355150931001ec982d..4be553b5e4c0c2685de81b780bfc100e0998b0ba 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -914,6 +914,7 @@ DeveloperPrivateUpdateExtensionConfigurationFunction::Run() {
@@ -916,6 +916,7 @@ DeveloperPrivateUpdateExtensionConfigurationFunction::Run() {
util::SetIsIncognitoEnabled(
extension->id(), browser_context(), *update.incognito_access);
}
Expand Down
6 changes: 3 additions & 3 deletions patches/chrome-browser-extensions-extension_tab_util.cc.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index aaac6830f2da4b5b58dc5a2bf9ffada09647e44a..106b6497697593b13e09c3107173dc6f54009d72 100644
index 4260e615cf9bc4bcc0fbabfc8a5fb5b236b8bd0f..84559e23b05b1ca28e4cc1cdbee48fa798b5dced 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -766,6 +766,7 @@ bool ExtensionTabUtil::IsKillURL(const GURL& url) {
@@ -779,6 +779,7 @@ bool ExtensionTabUtil::IsKillURL(const GURL& url) {
GURL fixed_url =
url_formatter::FixupURL(url.possibly_invalid_spec(), std::string());
if (!fixed_url.SchemeIs(content::kChromeUIScheme))
+ if (!fixed_url.SchemeIs(content::kBraveUIScheme))
return false;

base::StringPiece fixed_host = fixed_url.host_piece();
@@ -865,7 +866,7 @@ bool ExtensionTabUtil::OpenOptionsPageFromAPI(
@@ -878,7 +879,7 @@ bool ExtensionTabUtil::OpenOptionsPageFromAPI(
// initiated the command via chrome.runtime.openOptionsPage. For a spanning
// mode extension, this API could only be called from a regular profile, since
// that's the only place it's running.
Expand Down
12 changes: 0 additions & 12 deletions patches/chrome-browser-resources-extensions-item.js.patch

This file was deleted.

5 changes: 2 additions & 3 deletions patches/chrome-browser-resources-extensions-service.js.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
diff --git a/chrome/browser/resources/extensions/service.js b/chrome/browser/resources/extensions/service.js
index df646188a53f43dc4151d96effe897b0e55e251c..ba09bb8300d716cc5dc6a451325d020e62444fe9 100644
index df646188a53f43dc4151d96effe897b0e55e251c..be341d90f69808b1186876442e1f560acfa4baef 100644
--- a/chrome/browser/resources/extensions/service.js
+++ b/chrome/browser/resources/extensions/service.js
@@ -222,6 +222,13 @@ export class Service {
@@ -222,6 +222,12 @@ export class Service {
incognitoAccess: isAllowedIncognito,
});
}
+ /** @override */
+ setItemAllowedTor(id, isAllowedTor) {
+ chrome.developerPrivate.updateExtensionConfiguration({
+ extensionId: id,
Expand Down
10 changes: 5 additions & 5 deletions patches/extensions-browser-extension_protocols.cc.patch
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
diff --git a/extensions/browser/extension_protocols.cc b/extensions/browser/extension_protocols.cc
index e4e1bf4054ad7f19a4e965d6a36c972484196307..dee959c3b2176ec404537ab7dc48c09e7e10dc3b 100644
index 1841283a1f846af6c8d40eacaba409c63766a2c1..6f6f66ada5ced358db6288fe0bdaff39249a21a8 100644
--- a/extensions/browser/extension_protocols.cc
+++ b/extensions/browser/extension_protocols.cc
@@ -242,6 +242,7 @@ void ReadResourceFilePathAndLastModifiedTime(
@@ -243,6 +243,7 @@ void ReadResourceFilePathAndLastModifiedTime(

bool ExtensionCanLoadInIncognito(bool is_main_frame,
const Extension* extension,
+ bool is_tor,
bool extension_enabled_in_incognito) {
if (!extension || !extension_enabled_in_incognito)
return false;
@@ -264,6 +265,7 @@ bool AllowExtensionResourceLoad(const GURL& url,
@@ -265,6 +266,7 @@ bool AllowExtensionResourceLoad(const GURL& url,
ui::PageTransition page_transition,
int child_id,
bool is_incognito,
+ bool is_tor,
const Extension* extension,
bool extension_enabled_in_incognito,
const ExtensionSet& extensions,
@@ -272,6 +274,7 @@ bool AllowExtensionResourceLoad(const GURL& url,
@@ -273,6 +275,7 @@ bool AllowExtensionResourceLoad(const GURL& url,
resource_type == blink::mojom::ResourceType::kMainFrame;
if (is_incognito &&
!ExtensionCanLoadInIncognito(is_main_frame, extension,
+ is_tor,
extension_enabled_in_incognito)) {
return false;
}
@@ -555,6 +558,7 @@ class ExtensionURLLoaderFactory
@@ -556,6 +559,7 @@ class ExtensionURLLoaderFactory
static_cast<blink::mojom::ResourceType>(request.resource_type),
static_cast<ui::PageTransition>(request.transition_type),
render_process_id_, browser_context_->IsOffTheRecord(),
Expand Down

0 comments on commit 454244f

Please sign in to comment.