2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
2018-10-09 17:37:20 +00:00
|
|
|
Date: Tue, 9 Oct 2018 10:36:20 -0700
|
2021-05-19 18:20:12 +00:00
|
|
|
Subject: mas: avoid some private APIs
|
2018-09-21 00:30:26 +00:00
|
|
|
|
|
|
|
Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be
|
|
|
|
excluded for people who want to submit their apps to the Mac App store.
|
|
|
|
|
2022-04-05 16:09:12 +00:00
|
|
|
diff --git a/base/process/process_info_mac.cc b/base/process/process_info_mac.cc
|
2023-07-16 14:14:43 +00:00
|
|
|
index 94a028be3c315edc0056408ab9ab41b6b001a1c1..0d830234edb5621f57e39f4a951d357a23f677c1 100644
|
2022-04-05 16:09:12 +00:00
|
|
|
--- a/base/process/process_info_mac.cc
|
|
|
|
+++ b/base/process/process_info_mac.cc
|
2023-07-16 14:14:43 +00:00
|
|
|
@@ -8,15 +8,21 @@
|
2022-04-05 16:09:12 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2022-04-05 16:09:12 +00:00
|
|
|
extern "C" {
|
2023-07-16 14:14:43 +00:00
|
|
|
pid_t responsibility_get_pid_responsible_for_pid(pid_t);
|
2022-04-05 16:09:12 +00:00
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
namespace base {
|
|
|
|
|
|
|
|
bool IsProcessSelfResponsible() {
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2023-07-16 14:14:43 +00:00
|
|
|
const pid_t pid = getpid();
|
|
|
|
return responsibility_get_pid_responsible_for_pid(pid) == pid;
|
|
|
|
+#else
|
|
|
|
+ return true;
|
2022-04-05 16:09:12 +00:00
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
2023-07-16 14:14:43 +00:00
|
|
|
} // namespace base
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
|
2023-08-15 15:49:41 +00:00
|
|
|
index d4db3b179725cb96bcbd0f73db7d52ef8b7522db..6afbf1defb0591d9fe59a81e6c74746d3e15f081 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
|
|
|
|
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm
|
2019-04-20 17:20:37 +00:00
|
|
|
@@ -10,9 +10,11 @@
|
|
|
|
#include "sandbox/mac/seatbelt.h"
|
2018-10-24 23:25:48 +00:00
|
|
|
#include "sandbox/mac/system_services.h"
|
2018-09-14 05:02:16 +00:00
|
|
|
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2018-09-14 05:02:16 +00:00
|
|
|
extern "C" {
|
2019-01-12 01:00:43 +00:00
|
|
|
CGError CGSSetDenyWindowServerConnections(bool);
|
2019-02-26 21:31:29 +00:00
|
|
|
}
|
2018-09-14 05:02:16 +00:00
|
|
|
+#endif
|
|
|
|
|
2023-08-15 15:49:41 +00:00
|
|
|
namespace content {
|
|
|
|
|
|
|
|
@@ -22,6 +24,7 @@
|
2019-01-12 01:00:43 +00:00
|
|
|
// verifies there are no existing open connections), and then indicates that
|
|
|
|
// Chrome should continue execution without access to launchservicesd.
|
|
|
|
void DisableSystemServices() {
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2019-01-12 01:00:43 +00:00
|
|
|
// Tell the WindowServer that we don't want to make any future connections.
|
|
|
|
// This will return Success as long as there are no open connections, which
|
|
|
|
// is what we want.
|
2023-08-15 15:49:41 +00:00
|
|
|
@@ -30,6 +33,7 @@ void DisableSystemServices() {
|
2018-10-24 23:25:48 +00:00
|
|
|
|
|
|
|
sandbox::DisableLaunchServices();
|
2020-09-21 08:00:36 +00:00
|
|
|
sandbox::DisableCoreServicesCheckFix();
|
2018-09-14 05:02:16 +00:00
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
2019-04-20 17:20:37 +00:00
|
|
|
} // namespace
|
2020-08-26 04:13:42 +00:00
|
|
|
diff --git a/content/renderer/theme_helper_mac.mm b/content/renderer/theme_helper_mac.mm
|
2023-08-15 15:49:41 +00:00
|
|
|
index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019bdd5280c 100644
|
2020-08-26 04:13:42 +00:00
|
|
|
--- a/content/renderer/theme_helper_mac.mm
|
|
|
|
+++ b/content/renderer/theme_helper_mac.mm
|
2023-08-15 15:49:41 +00:00
|
|
|
@@ -8,10 +8,11 @@
|
|
|
|
|
|
|
|
#include "base/strings/sys_string_conversions.h"
|
2020-08-26 04:13:42 +00:00
|
|
|
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2020-08-26 04:13:42 +00:00
|
|
|
extern "C" {
|
2023-07-01 20:22:55 +00:00
|
|
|
bool CGFontRenderingGetFontSmoothingDisabled(void);
|
2020-08-26 04:13:42 +00:00
|
|
|
}
|
|
|
|
-
|
|
|
|
+#endif
|
|
|
|
namespace content {
|
|
|
|
|
2023-04-04 13:42:56 +00:00
|
|
|
void SystemColorsDidChange(int aqua_color_variant) {
|
2023-08-15 15:49:41 +00:00
|
|
|
@@ -24,8 +25,18 @@ void SystemColorsDidChange(int aqua_color_variant) {
|
2023-07-01 20:22:55 +00:00
|
|
|
}
|
|
|
|
|
2020-08-26 04:13:42 +00:00
|
|
|
bool IsSubpixelAntialiasingAvailable() {
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2023-07-01 20:22:55 +00:00
|
|
|
// See https://trac.webkit.org/changeset/239306/webkit for more info.
|
|
|
|
return !CGFontRenderingGetFontSmoothingDisabled();
|
2020-08-26 04:13:42 +00:00
|
|
|
+#else
|
2023-07-01 20:22:55 +00:00
|
|
|
+ NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
|
|
|
|
+ NSString *default_key = @"CGFontRenderingGetFontSmoothingDisabled";
|
|
|
|
+ // Check that key exists since boolForKey defaults to NO when the
|
|
|
|
+ // key is missing and this key in fact defaults to YES;
|
|
|
|
+ if ([defaults objectForKey:default_key] == nil)
|
|
|
|
+ return false;
|
|
|
|
+ return ![defaults boolForKey:default_key];
|
2020-08-26 04:13:42 +00:00
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
2023-07-01 20:22:55 +00:00
|
|
|
} // namespace content
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
|
chore: bump chromium to 118.0.5975.0 (main) (#39531)
* chore: bump chromium in DEPS to 118.0.5951.0
* chore: update printing.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4727894
No logic changes, but patch needed to be manually re-applied due to upstream code shear
* chore: update port_autofill_colors_to_the_color_pipeline.patch
No manual changes; patch applied with fuzz
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5953.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5955.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5957.0
* chore: update patches
* chore: include path of native_web_keyboard_event.h
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689
* chore: remove reference to eextensions/browser/notification-types.h
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4771627
* chore: update references to renamed upstream field NativeWebKeyboardEvent.skip_if_unhandled (formerly known as skip_in_browser
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689
Need a second pair of eyes on this commit. In particular the reference in content_converter.cc, skipInBrowser, seems to not be set or documented anywhere? Is this unused/vestigal code?
* chore: sync signature of ElectronExtensionsBrowserClient::IsValidContext() to upstream change
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4784198
* chore: add auto_pip_setting_helper.[cc,h] to chromium_src build
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4688277
Exiting upstream code used by chromium_src now depends on this new upstream class
* chore: bump chromium in DEPS to 118.0.5959.0
* chore: update add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
Xref: add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
manually adjust patch to minor upstream chagnes
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5961.0
* chore: bump chromium in DEPS to 118.0.5963.0
* chore: update patches
* 4780994: Rename various base files to "apple" since iOS uses them too
https://chromium-review.googlesource.com/c/chromium/src/+/4780994
* Many files moved from `mac` -> `apple`
This commit follows a handful of CLs that simply rename files/symbols to change `mac`
to `apple`
to signify their use across both macOS and iOS:
- 4784010: Move scoped_nsautorelease_pool to base/apple, leave a forwarding header
- 4790744: Move foundation_util to base/apple, leave a forwarding header
- 4790741: Move scoped_cftypreref to base/apple, leave a forwarding header
- 4787627: Move and rename macOS+iOS base/ files in PA to "apple"
- 4780399: Move OSStatus logging to base/apple
- 4787387: Remove forwarding headers
- 4781113: Rename message_pump_mac to "apple" because iOS uses it too
* fixup minor patch update error
A function param got dropped from this patch somewhere earlier
* chore: bump chromium in DEPS to 118.0.5965.2
* chore: update patches
* 4799213: Move ScopedTypeRef and ScopedCFTypeRef into base::apple::
https://chromium-review.googlesource.com/c/chromium/src/+/4799213
* Fix removed include to BrowserContext
In crrev.com/c/4767962 an include to BrowserContext was removed,
which was necessary for compilation. This broke only for us because
"chrome/browser/profiles/profile.h" includes that class, but we remove
all references to profiles.
* chore: bump chromium in DEPS to 118.0.5967.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5969.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5971.0
* chore: bump chromium in DEPS to 118.0.5973.0
* chore: update patches
* 4772121: [OOPIF PDF] Replace PDFWebContentsHelper with PDFDocumentHelper
https://chromium-review.googlesource.com/c/chromium/src/+/4772121
* 4811164: [Extensions] Do some cleanup in ChromeManagementAPIDelegate.
https://chromium-review.googlesource.com/c/chromium/src/+/4811164
* 4809488: Remove duplicate dnd functionality between Web and Renderer prefs
https://chromium-review.googlesource.com/c/chromium/src/+/4809488
Given that this is no longer an option of web preferences, we should
consider deprecating this option and then removing it.
* chore: bump chromium in DEPS to 118.0.5975.0
* chore: update patches
* fixup! chore: add auto_pip_settings_helper.{cc|h} to chromium_src build
* Reland "[windows] Remove RegKey::DeleteEmptyKey"
Refs https://chromium-review.googlesource.com/c/chromium/src/+/4813255
* Ensure StrCat means StrCat
Refs https://chromium-review.googlesource.com/c/chromium/src/+/1117180
* fixup! Remove RegKey::DeleteEmptyKey
* Consistently reject large p and large q in DH
Refs https://boringssl-review.googlesource.com/c/boringssl/+/62226
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2023-09-01 06:54:59 +00:00
|
|
|
index 82836fc5fe3a7279f4fd15f297969162bc63089a..4276251875612430d1b197578f659736dbd86925 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/device/bluetooth/bluetooth_adapter_mac.mm
|
|
|
|
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
|
2023-08-15 15:49:41 +00:00
|
|
|
@@ -37,6 +37,7 @@
|
|
|
|
#include "device/bluetooth/bluetooth_socket_mac.h"
|
|
|
|
#include "device/bluetooth/public/cpp/bluetooth_address.h"
|
2018-09-14 05:02:16 +00:00
|
|
|
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2018-09-14 05:02:16 +00:00
|
|
|
extern "C" {
|
|
|
|
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
|
|
|
|
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
|
2023-08-15 15:49:41 +00:00
|
|
|
@@ -50,6 +51,7 @@
|
2018-09-14 05:02:16 +00:00
|
|
|
// [4] https://support.apple.com/kb/PH25091
|
|
|
|
void IOBluetoothPreferenceSetControllerPowerState(int state);
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
2023-08-15 15:49:41 +00:00
|
|
|
@@ -93,8 +95,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
|
2022-06-01 06:12:47 +00:00
|
|
|
: controller_state_function_(
|
2018-09-14 05:02:16 +00:00
|
|
|
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
|
|
|
|
base::Unretained(this))),
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2018-09-14 05:02:16 +00:00
|
|
|
power_state_function_(
|
|
|
|
base::BindRepeating(IOBluetoothPreferenceSetControllerPowerState)),
|
|
|
|
+#endif
|
|
|
|
classic_discovery_manager_(
|
|
|
|
BluetoothDiscoveryManagerMac::CreateClassic(this)),
|
2023-03-10 16:07:42 +00:00
|
|
|
device_paired_status_callback_(
|
2023-08-15 15:49:41 +00:00
|
|
|
@@ -243,8 +247,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2018-09-14 05:02:16 +00:00
|
|
|
power_state_function_.Run(base::strict_cast<int>(powered));
|
|
|
|
return true;
|
|
|
|
+#else
|
|
|
|
+ return false;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
2023-03-10 16:07:42 +00:00
|
|
|
base::WeakPtr<BluetoothLowEnergyAdapterApple>
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
|
chore: bump chromium to 118.0.5975.0 (main) (#39531)
* chore: bump chromium in DEPS to 118.0.5951.0
* chore: update printing.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4727894
No logic changes, but patch needed to be manually re-applied due to upstream code shear
* chore: update port_autofill_colors_to_the_color_pipeline.patch
No manual changes; patch applied with fuzz
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5953.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5955.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5957.0
* chore: update patches
* chore: include path of native_web_keyboard_event.h
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689
* chore: remove reference to eextensions/browser/notification-types.h
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4771627
* chore: update references to renamed upstream field NativeWebKeyboardEvent.skip_if_unhandled (formerly known as skip_in_browser
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689
Need a second pair of eyes on this commit. In particular the reference in content_converter.cc, skipInBrowser, seems to not be set or documented anywhere? Is this unused/vestigal code?
* chore: sync signature of ElectronExtensionsBrowserClient::IsValidContext() to upstream change
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4784198
* chore: add auto_pip_setting_helper.[cc,h] to chromium_src build
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4688277
Exiting upstream code used by chromium_src now depends on this new upstream class
* chore: bump chromium in DEPS to 118.0.5959.0
* chore: update add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
Xref: add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
manually adjust patch to minor upstream chagnes
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5961.0
* chore: bump chromium in DEPS to 118.0.5963.0
* chore: update patches
* 4780994: Rename various base files to "apple" since iOS uses them too
https://chromium-review.googlesource.com/c/chromium/src/+/4780994
* Many files moved from `mac` -> `apple`
This commit follows a handful of CLs that simply rename files/symbols to change `mac`
to `apple`
to signify their use across both macOS and iOS:
- 4784010: Move scoped_nsautorelease_pool to base/apple, leave a forwarding header
- 4790744: Move foundation_util to base/apple, leave a forwarding header
- 4790741: Move scoped_cftypreref to base/apple, leave a forwarding header
- 4787627: Move and rename macOS+iOS base/ files in PA to "apple"
- 4780399: Move OSStatus logging to base/apple
- 4787387: Remove forwarding headers
- 4781113: Rename message_pump_mac to "apple" because iOS uses it too
* fixup minor patch update error
A function param got dropped from this patch somewhere earlier
* chore: bump chromium in DEPS to 118.0.5965.2
* chore: update patches
* 4799213: Move ScopedTypeRef and ScopedCFTypeRef into base::apple::
https://chromium-review.googlesource.com/c/chromium/src/+/4799213
* Fix removed include to BrowserContext
In crrev.com/c/4767962 an include to BrowserContext was removed,
which was necessary for compilation. This broke only for us because
"chrome/browser/profiles/profile.h" includes that class, but we remove
all references to profiles.
* chore: bump chromium in DEPS to 118.0.5967.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5969.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5971.0
* chore: bump chromium in DEPS to 118.0.5973.0
* chore: update patches
* 4772121: [OOPIF PDF] Replace PDFWebContentsHelper with PDFDocumentHelper
https://chromium-review.googlesource.com/c/chromium/src/+/4772121
* 4811164: [Extensions] Do some cleanup in ChromeManagementAPIDelegate.
https://chromium-review.googlesource.com/c/chromium/src/+/4811164
* 4809488: Remove duplicate dnd functionality between Web and Renderer prefs
https://chromium-review.googlesource.com/c/chromium/src/+/4809488
Given that this is no longer an option of web preferences, we should
consider deprecating this option and then removing it.
* chore: bump chromium in DEPS to 118.0.5975.0
* chore: update patches
* fixup! chore: add auto_pip_settings_helper.{cc|h} to chromium_src build
* Reland "[windows] Remove RegKey::DeleteEmptyKey"
Refs https://chromium-review.googlesource.com/c/chromium/src/+/4813255
* Ensure StrCat means StrCat
Refs https://chromium-review.googlesource.com/c/chromium/src/+/1117180
* fixup! Remove RegKey::DeleteEmptyKey
* Consistently reject large p and large q in DH
Refs https://boringssl-review.googlesource.com/c/boringssl/+/62226
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2023-09-01 06:54:59 +00:00
|
|
|
index f834373f52a65b67fa0b601a18ac81044e66b0d2..5d7c4cf2fb323bdef2d5f671f96e2a4d6a7fff4f 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/media/audio/mac/audio_manager_mac.cc
|
|
|
|
+++ b/media/audio/mac/audio_manager_mac.cc
|
2023-03-10 16:07:42 +00:00
|
|
|
@@ -969,7 +969,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
|
2018-09-14 05:02:16 +00:00
|
|
|
|
|
|
|
void AudioManagerMac::InitializeOnAudioThread() {
|
|
|
|
DCHECK(GetTaskRunner()->BelongsToCurrentThread());
|
|
|
|
- InitializeCoreAudioDispatchOverride();
|
|
|
|
+ // InitializeCoreAudioDispatchOverride();
|
chore: bump chromium to 92.0.4475.0 (master) (#28462)
* chore: bump chromium in DEPS to 91.0.4464.0
* chore: rebuild chromium/dcheck.patch with import-patches -3
Mechanical only; no code changes
* chore: remove content_browser_main_loop.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2725153
The function being patched (BrowserMainLoop::MainMessageLoopRun()) no
longer exists.
NB: if removing this introduces regressions the likely fix will be to
add a similar patch for ShellBrowserMainParts::WillRunMainMessageLoop()
which has similar code and was added at the same time this was removed.
* chore: rebuild chromium/put_back_deleted_colors_for_autofill.patch with import-patches -3
Mechanical only; no code changes
* chore: rebuild chromium/disable_color_correct_rendering.patch with import-patches -3
Mechanical only; no code changes
* chore: rebuild chromium/eat_allow_disabling_blink_scheduler_throttling_per_renderview.patch with patch
Mechanical only; no code changes
* chore: rebuild chromium/gpu_notify_when_dxdiag_request_fails.patch with import-patches -3
Mechanical only; no code changes
* chore: rebuild chromium/ui_gtk_public_header.patch manually
no code changes
* chore: rebuild chromium/web_contents.patch with import-patches -3
Mechanical only; no code changes
* chore: remove v8/skip_global_registration_of_shared_arraybuffer_backing_stores.patch
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/2763874
This patch has been merged upstream
* chore: export patches
* chore: update add_trustedauthclient_to_urlloaderfactory.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2757969
Sync with removal of render_frame_id_
* chore: sync chromium/put_back_deleted_colors_for_autofill.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2785841
SkColorFromColorId() no longer takes theme, scheme args
* chore: sync chromium/put_back_deleted_colors_for_autofill.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2772143
Change new calls to GetDarkSchemeColor to fit our patched call signature
* chore: update add_trustedauthclient_to_urlloaderfactory.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2757969
Sync with removal of render_frame_id_ in our mojom
* chore: update chromium/frame_host_manager.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2740008
UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool
* chore: update chromium/revert_remove_contentrendererclient_shouldfork.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2755314
Upstream has removed `history_list_length_` which we were comparing to 0
to calculate our `is_initial_navigation` bool when calling ShouldFork().
ShouldFork() is ours and none of the code paths actually use that param,
so this commit removes it altogether.
* chore: update permissions_to_register
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2789074
Replace all uses of APIPermission::ID enum with Mojo type
* refactor: update return type of PreMainMessageLoopRun()
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2725153
Used to return void; now returns an int errorcode.
Note: 2725153 also has some nice doc updates about Browser's "stages"
* refactor: sync ElectronBrowserMainParts to MainParts changes
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2725153
RunMainMessageLoopParts has been replaced with WillRunMainMessageLoop
so `BrowserMainLoop::result_code_` is no longer available to us for our
exit_code_ pointer.
This variable held a dual role: (1) of course, hold the exit code, but
also (2) was a nullptr before the message loop was ready, indicating to
anyone calling SetExitCode() that we were still in startup and could
just exit() without any extra steps. exit_code_ still fulfills these two
roles but is now a base::Optional.
* chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2725153
BrowserMainParts::BrowsePreDefaultMainMesssageLoopRun() has been
removed; move that work to the new WillRunMainMessageLoop().
* refactor: stop using CallbackList; it has been removed.
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2785973
* refactor: update use of threadpools.
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2773408
The upstream code is still in flux (e.g. reverts and re-lands) but the
tl;dr for this commit is (1) include thread_pool.h if you're using it
and (2) don't instantiate pools directly.
* refactor: remove routing_id from CreateLoaderAndStart
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2762858
NB: One logic branch in ProxyingURLLoaderFactory::CreateLoaderAndStart
calls std::make_unique<InProgressRequest>, which needs a routing_id.
This PR uses the member field `routing_id_` since there's no longer one
being passed into CreateLoaderAndStart.
* refactor: sync to upstream ParittionOptions churn
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2771318
PartitionOptions' enums have changed.
* refactor: update Manifest::Location usage
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2771320
tldr: s/Manifest::FOO/ManifestLocation::kFoo/
* chore: bump chromium in DEPS to 91.0.4465.0
* update patches
* refactor: update extensions::Manifest to upstream
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2771320
- extensions::Manifest::COMPONENT
+ extensions::mojom::ManifestLocation::kExternalComponent
* refactor: sync with upstream UrlInfo ctor changes
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2740008
UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool
* chore: update invocation of convert_protocol_to_json.py
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2792623
python3 is being used in parts of the upstream build, but the copy of
convert_protocol_to_json.py invoked in v8/third_party/inspector_protocol
is not python3-friendly. Node has a py2+3-friendly version of it in its
tools directory, so call it instead.
* chore: use extensions::mojom::APIPermissionID
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2791122
tldr:
- extensions::APIPermission::kFoo
+ extensions::mojom::APIPermissionID::kFoo
* chore: Remove support for TLS1.0/1.1 in SSLVersionMin policy
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2765737
Remove TLS v1.0 & 1.1 from our SSLProtocolVersionFromString() function.
This is the same change made upstream at
https://chromium-review.googlesource.com/c/chromium/src/+/2765737/8/chrome/browser/ssl/ssl_config_service_manager_pref.cc
* fixup! chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun
* chore: Use IDType for permission change subscriptions.
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2791431
tldr: {Subscribe,Unsubscribe}PermissionStatusChange's tag type used to
be an int; now it's the new SubscriptionId type (which is an IdType64).
* chore: sync PowerMonitor code to upstream refactor
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2752635
tldr: PowerMonitor has been split into PowerStateObserver,
PowerSuspendObserver, and PowerThermalObserver to reduce number of tasks
posted to consumers who only need notifications for one of those things
instead of all of them.
* chore: use PartitionOptions's new Cookies field
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2771318
* Revert "refactor: remove routing_id from CreateLoaderAndStart"
This reverts commit 8c9773b87a3c84f9073a47089eb2b6889d745245.
8c9773b was only a partial fix; reverting to start & try again.
* update patches
* chore: bump chromium in DEPS to 91.0.4466.0
* chore: update chromium/accelerator.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2795472
tldr: sync patch with upstream renamed variable & macro names.
* chore: update chromium/gtk_visibility.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2796200
tldr: no code changes; just updating the diff to apply cleanly.
note: ooh upstream Wayland hacking!
* chore: update chromium/picture-in-picture.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2710023
tldr: no code changes; just updating the diff to apply cleanly.
* chore: update chromium/worker_feat_add_hook_to_notify_script_ready.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2775573
tldr: no code changes; just updating the diff to apply cleanly.
* chore: export_all_patches
* chore: update chromium/feat_add_set_theme_source_to_allow_apps_to.patch
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2796511
tldr: NotifyObservers has been renamed to NotifyOnNativeThemeUpdated,
so update the invocation in our patch.
* chore: update ElectronBrowserClient w/upstream API
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2797454
tldr: GetDevToolsManagerDelegate() was returning an owned raw pointer.
Replaced it with CreateDevToolsManagerDelegate() which uses unique_ptr<>.
* chore: handle new content::PermissionType::FILE_HANDLING in toV8()
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2762201
`file-handling` string confirmed in https://chromium-review.googlesource.com/c/chromium/src/+/2762201/18/chrome/browser/ui/webui/settings/site_settings_helper.cc
* refactor: remove routing_id from CreateLoaderAndStart pt 1
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2762858
Part 1: the easiest ones
* 2796724: Support Python3
https://chromium-review.googlesource.com/c/infra/luci/python-adb/+/2796724
* chore: bump chromium in DEPS to 91.0.4468.0
* 2668974: WebShare: Implement SharingServicePicker
https://chromium-review.googlesource.com/c/chromium/src/+/2668974
* 2802766: Apply modernize-make-unique to media/
https://chromium-review.googlesource.com/c/chromium/src/+/2802766
* 2802823: Apply modernize-make-unique to gpu/
https://chromium-review.googlesource.com/c/chromium/src/+/2802823
* 2803041: Apply modernize-make-unique to remaining files
https://chromium-review.googlesource.com/c/chromium/src/+/2803041
* 2798873: Convert GtkKeyBindingsHandler build checks to runtime checks
https://chromium-review.googlesource.com/c/chromium/src/+/2798873
* 2733595: [ch-r] Parse ACCEPT_CH H2/3 frame and restart with new headers if needed
https://chromium-review.googlesource.com/c/chromium/src/+/2733595
* chore: update patch indices
* 2795107: Remove unused PermissionRequest IDs.
https://chromium-review.googlesource.com/c/chromium/src/+/2795107
* chore: bump chromium in DEPS to 91.0.4469.0
* chore: fixup patch indices
* chore: bump chromium in DEPS to 91.0.4469.5
* PiP 1.5: Add microphone, camera, and hang up buttons to the PiP window
https://chromium-review.googlesource.com/c/chromium/src/+/2710023
* fixup! refactor: remove routing_id from CreateLoaderAndStart
* refactor: use URLLoaderNetworkServiceObserver for auth requests from SimpleURLLoader
* fixup! chore: fixup patch indices
* 2724817: Expand scope of wasm-eval to all URLs
https://chromium-review.googlesource.com/c/chromium/src/+/2724817
* Fixup patch after rebase
* chore: bump chromium in DEPS to 91.0.4472.0
* 2797341: [ozone/x11] Enabled the global shortcut listener.
https://chromium-review.googlesource.com/c/chromium/src/+/2797341
* 2805553: Reland Add GTK ColorMixers to ColorPipeline P1
https://chromium-review.googlesource.com/c/chromium/src/+/2805553
* 2804366: PiP 1.5: Label back to tab button with origin and center it
https://chromium-review.googlesource.com/c/chromium/src/+/2804366
* 2784730: Fix crash on AX mode change in NativeViewHost without a Widget
https://chromium-review.googlesource.com/c/chromium/src/+/2784730
* chore: update patch indices
* 2810174: Add PdfAnnotationsEnabled policy.
https://chromium-review.googlesource.com/c/chromium/src/+/2810174
* 2807829: Allow capturers to indicate if they want a WakeLock or not.
https://chromium-review.googlesource.com/c/chromium/src/+/2807829
* chore: bump chromium in DEPS to 92.0.4473.0
* chore: bump chromium in DEPS to 92.0.4474.0
* chore: bump chromium in DEPS to 92.0.4475.0
* chore: update patches
* chore: updates patches
* chore: update is_media_key patch to handle new ozone impl
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2797341
* fix: ExecuteJavascript requests now need to be flagged as non-bf-aware
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2787195
* chore: icon_util_x11 is now icon_util_linux
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2791362
* build: update sysroots
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2628496
* build: fix missing symbols on linux build
* use_ozone and use_x11 are not exclusive
* new button view to build for pip
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2797341
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2804366
* chore: fix broken gtk_util color patch
* chore: remove patch conflict
* build: update linux manifests
* chore: build bttlb on all platforms for pip
* chore: add thread_pool include for views delegate win
* chore: fix lint
* chore: add node patches for V8 changes
* build: add missing base include on windows
* fix: update frame host manager patch for new state transitions
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2714464
* chore: update windows zip manifests
* chore: update mac zip manifests
* chore: fix patch linting
* refactor: implement missing URLLoaderNetworkServiceObserver methods
It is against The Mojo Rules to leave hanging callbacks. These always
have to be called.
Refs: https://github.com/electron/electron/commit/186528aab9f8e29d658f07d220bb7f627980edda
* spec: fix locale test on local linux
* fix: pass the exit code correctly in new PreMainMessageLoopRun
Refs: https://github.com/electron/electron/commit/2622e91c4493ceb032e2f80cb484885bb8f97475
* fix: ensure we early-exit when request_handler_ is not provided
Refs: https://github.com/electron/electron/commit/93077afbfb6db248a0c0cc447d7ad2c9ccfda1d5
* fix: strongly set result_code in the BrowserMainLoop
* fix: invalid usage of non-targetted PostTask
You must always either use a host threadpool or specify a target
thread. In this case we did neither after this refactor.
Refs: https://github.com/electron/electron/pull/28462/commits/4e33ee0ad35a710bd34641cb0376bdee6aea2d1f
* chore: fix gn check
* chore: remove stray .rej files in patch
* chore: add mojo error code to url loader failure
* build: ensure CI is truthy in arm test env
* fix: handle windowCaptureMacV2 being enabled when fetching media source id
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2709931
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-04-15 17:44:35 +00:00
|
|
|
power_observer_ = std::make_unique<AudioPowerObserver>();
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
|
2023-02-03 11:43:42 +00:00
|
|
|
index a93e7cd74d2a9d692304ecf10279fae8e96bb695..3506d6ca555701bad6623cc1c614e0081892e42b 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/net/dns/dns_config_service_posix.cc
|
|
|
|
+++ b/net/dns/dns_config_service_posix.cc
|
2022-07-13 21:26:16 +00:00
|
|
|
@@ -130,8 +130,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
|
2018-09-14 05:02:16 +00:00
|
|
|
|
2021-01-25 16:46:00 +00:00
|
|
|
bool Watch() override {
|
|
|
|
CheckOnCorrectSequence();
|
|
|
|
-
|
2018-09-14 05:02:16 +00:00
|
|
|
bool success = true;
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2020-03-11 11:15:07 +00:00
|
|
|
if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged,
|
|
|
|
base::Unretained(this)))) {
|
2018-09-14 05:02:16 +00:00
|
|
|
LOG(ERROR) << "DNS config watch failed to start.";
|
2022-07-13 21:26:16 +00:00
|
|
|
@@ -148,6 +148,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
|
2021-01-12 23:31:23 +00:00
|
|
|
success = false;
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
2022-02-10 02:58:52 +00:00
|
|
|
#endif // !BUILDFLAG(IS_IOS)
|
2018-09-14 05:02:16 +00:00
|
|
|
+#endif
|
|
|
|
return success;
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/sandbox/mac/sandbox_compiler.cc b/sandbox/mac/sandbox_compiler.cc
|
2023-01-06 02:35:34 +00:00
|
|
|
index f35d9ef2a2df3db8ecbf1d7b909c7b1cf33f3cd9..a710b8b4f851666fd65bb37f69ec2fa70259697b 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/sandbox/mac/sandbox_compiler.cc
|
|
|
|
+++ b/sandbox/mac/sandbox_compiler.cc
|
2023-01-06 02:35:34 +00:00
|
|
|
@@ -47,6 +47,7 @@ bool SandboxCompiler::SetParameter(const std::string& key,
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
|
|
|
|
2023-01-06 02:35:34 +00:00
|
|
|
bool SandboxCompiler::CompileAndApplyProfile(std::string& error) {
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2023-01-06 02:35:34 +00:00
|
|
|
if (mode_ == Target::kSource) {
|
|
|
|
std::vector<const char*> params;
|
2018-09-14 05:02:16 +00:00
|
|
|
|
2023-01-06 02:35:34 +00:00
|
|
|
@@ -67,6 +68,9 @@ bool SandboxCompiler::CompileAndApplyProfile(std::string& error) {
|
|
|
|
}
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
2023-01-06 02:35:34 +00:00
|
|
|
return false;
|
|
|
|
+#else
|
|
|
|
+ return true;
|
2018-09-14 05:02:16 +00:00
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
2023-01-06 02:35:34 +00:00
|
|
|
bool SandboxCompiler::CompilePolicyToProto(mac::SandboxPolicy& policy,
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/sandbox/mac/seatbelt.cc b/sandbox/mac/seatbelt.cc
|
2023-02-21 10:44:18 +00:00
|
|
|
index 15c835e118456394c0a00ac98c11241c14ca75bd..83759e5fbc252fa57ca2fa122873dfac3d61d46d 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/sandbox/mac/seatbelt.cc
|
|
|
|
+++ b/sandbox/mac/seatbelt.cc
|
2023-02-21 10:44:18 +00:00
|
|
|
@@ -9,7 +9,7 @@
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
#include <sandbox.h>
|
|
|
|
-
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
int sandbox_init_with_parameters(const char* profile,
|
|
|
|
uint64_t flags,
|
|
|
|
const char* const parameters[],
|
|
|
|
@@ -40,13 +40,13 @@ sandbox_profile_t* sandbox_compile_string(const char* data,
|
|
|
|
char** error);
|
|
|
|
int sandbox_apply(sandbox_profile_t*);
|
|
|
|
void sandbox_free_profile(sandbox_profile_t*);
|
|
|
|
-
|
|
|
|
+#endif
|
|
|
|
} // extern "C"
|
|
|
|
|
|
|
|
namespace sandbox {
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
-
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
bool HandleSandboxResult(int rv, char* errorbuf, std::string* error) {
|
|
|
|
if (rv == 0) {
|
|
|
|
if (error)
|
|
|
|
@@ -74,36 +74,48 @@ bool HandleSandboxErrno(int rv, const char* message, std::string* error) {
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
+#endif
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
// static
|
|
|
|
Seatbelt::Parameters Seatbelt::Parameters::Create() {
|
|
|
|
Parameters params;
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
params.params_ = ::sandbox_create_params();
|
|
|
|
+#endif
|
|
|
|
return params;
|
|
|
|
}
|
|
|
|
|
|
|
|
Seatbelt::Parameters::Parameters() = default;
|
|
|
|
|
|
|
|
Seatbelt::Parameters::Parameters(Seatbelt::Parameters&& other) {
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
params_ = std::exchange(other.params_, nullptr);
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
Seatbelt::Parameters& Seatbelt::Parameters::operator=(
|
|
|
|
Seatbelt::Parameters&& other) {
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
params_ = std::exchange(other.params_, nullptr);
|
|
|
|
+#endif
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Seatbelt::Parameters::Set(const char* key, const char* value) {
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
return ::sandbox_set_param(params_, key, value) == 0;
|
|
|
|
+#else
|
|
|
|
+ return true;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
Seatbelt::Parameters::~Parameters() {
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
if (params_) {
|
|
|
|
::sandbox_free_params(params_);
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
// Initialize the static member variables.
|
|
|
|
@@ -114,6 +126,7 @@ const char* Seatbelt::kProfilePureComputation = kSBXProfilePureComputation;
|
|
|
|
|
|
|
|
// static
|
|
|
|
bool Seatbelt::Init(const char* profile, uint64_t flags, std::string* error) {
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
// OS X deprecated these functions, but did not provide a suitable replacement,
|
|
|
|
// so ignore the deprecation warning.
|
|
|
|
#pragma clang diagnostic push
|
|
|
|
@@ -122,6 +135,9 @@ bool Seatbelt::Init(const char* profile, uint64_t flags, std::string* error) {
|
|
|
|
int rv = ::sandbox_init(profile, flags, &errorbuf);
|
|
|
|
return HandleSandboxResult(rv, errorbuf, error);
|
|
|
|
#pragma clang diagnostic pop
|
|
|
|
+#else
|
|
|
|
+ return true;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
// static
|
|
|
|
@@ -129,10 +145,14 @@ bool Seatbelt::InitWithParams(const char* profile,
|
|
|
|
uint64_t flags,
|
|
|
|
const char* const parameters[],
|
|
|
|
std::string* error) {
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
char* errorbuf = nullptr;
|
|
|
|
int rv =
|
|
|
|
::sandbox_init_with_parameters(profile, flags, parameters, &errorbuf);
|
|
|
|
return HandleSandboxResult(rv, errorbuf, error);
|
|
|
|
+#else
|
|
|
|
+ return true;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
// static
|
|
|
|
@@ -140,6 +160,7 @@ bool Seatbelt::Compile(const char* profile,
|
|
|
|
const Seatbelt::Parameters& params,
|
|
|
|
std::string& compiled_profile,
|
|
|
|
std::string* error) {
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
char* errorbuf = nullptr;
|
|
|
|
sandbox_profile_t* sandbox_profile =
|
|
|
|
::sandbox_compile_string(profile, params.params(), &errorbuf);
|
|
|
|
@@ -149,33 +170,44 @@ bool Seatbelt::Compile(const char* profile,
|
|
|
|
compiled_profile.assign(reinterpret_cast<const char*>(sandbox_profile->data),
|
|
|
|
sandbox_profile->size);
|
|
|
|
::sandbox_free_profile(sandbox_profile);
|
|
|
|
+#endif
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
// static
|
|
|
|
bool Seatbelt::ApplyCompiledProfile(const std::string& profile,
|
|
|
|
std::string* error) {
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
sandbox_profile_t sbox_profile = {
|
|
|
|
.builtin = nullptr,
|
|
|
|
.data = reinterpret_cast<const uint8_t*>(profile.data()),
|
|
|
|
.size = profile.size()};
|
|
|
|
return HandleSandboxErrno(::sandbox_apply(&sbox_profile),
|
|
|
|
"sandbox_apply: ", error);
|
|
|
|
+#else
|
|
|
|
+ return true;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
// static
|
|
|
|
void Seatbelt::FreeError(char* errorbuf) {
|
|
|
|
+#if !IS_MAS_BUILD()
|
|
|
|
// OS X deprecated these functions, but did not provide a suitable replacement,
|
|
|
|
// so ignore the deprecation warning.
|
|
|
|
#pragma clang diagnostic push
|
|
|
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
return ::sandbox_free_error(errorbuf);
|
|
|
|
#pragma clang diagnostic pop
|
|
|
|
+#endif
|
|
|
|
}
|
2018-09-14 05:02:16 +00:00
|
|
|
|
|
|
|
// static
|
|
|
|
bool Seatbelt::IsSandboxed() {
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2018-09-14 05:02:16 +00:00
|
|
|
return ::sandbox_check(getpid(), NULL, 0);
|
|
|
|
+#else
|
|
|
|
+ return true;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace sandbox
|
|
|
|
diff --git a/sandbox/mac/seatbelt_extension.cc b/sandbox/mac/seatbelt_extension.cc
|
2022-11-14 20:46:52 +00:00
|
|
|
index 18479382a277cb2b25626ec8d31442bfd1377ee6..7d80d7fa8337523c3a70f317f883f0cc26c6f40b 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/sandbox/mac/seatbelt_extension.cc
|
|
|
|
+++ b/sandbox/mac/seatbelt_extension.cc
|
2020-05-26 20:06:26 +00:00
|
|
|
@@ -11,6 +11,7 @@
|
|
|
|
#include "base/notreached.h"
|
2018-09-14 05:02:16 +00:00
|
|
|
#include "sandbox/mac/seatbelt_extension_token.h"
|
|
|
|
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2018-09-14 05:02:16 +00:00
|
|
|
// libsandbox private API.
|
|
|
|
extern "C" {
|
|
|
|
extern const char* APP_SANDBOX_READ;
|
2021-10-06 02:21:00 +00:00
|
|
|
@@ -22,6 +23,7 @@ char* sandbox_extension_issue_file(const char* type,
|
2018-09-14 05:02:16 +00:00
|
|
|
const char* path,
|
|
|
|
uint32_t flags);
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
namespace sandbox {
|
|
|
|
|
2021-10-06 02:21:00 +00:00
|
|
|
@@ -50,7 +52,11 @@ std::unique_ptr<SeatbeltExtension> SeatbeltExtension::FromToken(
|
2018-09-14 05:02:16 +00:00
|
|
|
|
|
|
|
bool SeatbeltExtension::Consume() {
|
|
|
|
DCHECK(!token_.empty());
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2018-09-14 05:02:16 +00:00
|
|
|
handle_ = sandbox_extension_consume(token_.c_str());
|
|
|
|
+#else
|
|
|
|
+ handle_ = -1;
|
|
|
|
+#endif
|
|
|
|
return handle_ > 0;
|
|
|
|
}
|
|
|
|
|
2021-10-06 02:21:00 +00:00
|
|
|
@@ -62,7 +68,11 @@ bool SeatbeltExtension::ConsumePermanently() {
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool SeatbeltExtension::Revoke() {
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2018-09-14 05:02:16 +00:00
|
|
|
int rv = sandbox_extension_release(handle_);
|
|
|
|
+#else
|
|
|
|
+ int rv = -1;
|
|
|
|
+#endif
|
|
|
|
handle_ = 0;
|
|
|
|
token_.clear();
|
|
|
|
return rv == 0;
|
2021-10-06 02:21:00 +00:00
|
|
|
@@ -80,12 +90,14 @@ SeatbeltExtension::SeatbeltExtension(const std::string& token)
|
2018-09-14 05:02:16 +00:00
|
|
|
char* SeatbeltExtension::IssueToken(SeatbeltExtension::Type type,
|
|
|
|
const std::string& resource) {
|
|
|
|
switch (type) {
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2018-09-14 05:02:16 +00:00
|
|
|
case FILE_READ:
|
|
|
|
return sandbox_extension_issue_file(APP_SANDBOX_READ, resource.c_str(),
|
|
|
|
0);
|
2021-10-06 02:21:00 +00:00
|
|
|
case FILE_READ_WRITE:
|
|
|
|
return sandbox_extension_issue_file(APP_SANDBOX_READ_WRITE,
|
|
|
|
resource.c_str(), 0);
|
2018-09-14 05:02:16 +00:00
|
|
|
+#endif
|
|
|
|
default:
|
|
|
|
NOTREACHED();
|
|
|
|
return nullptr;
|
2022-02-10 02:58:52 +00:00
|
|
|
diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm
|
chore: bump chromium to 118.0.5975.0 (main) (#39531)
* chore: bump chromium in DEPS to 118.0.5951.0
* chore: update printing.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4727894
No logic changes, but patch needed to be manually re-applied due to upstream code shear
* chore: update port_autofill_colors_to_the_color_pipeline.patch
No manual changes; patch applied with fuzz
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5953.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5955.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5957.0
* chore: update patches
* chore: include path of native_web_keyboard_event.h
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689
* chore: remove reference to eextensions/browser/notification-types.h
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4771627
* chore: update references to renamed upstream field NativeWebKeyboardEvent.skip_if_unhandled (formerly known as skip_in_browser
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689
Need a second pair of eyes on this commit. In particular the reference in content_converter.cc, skipInBrowser, seems to not be set or documented anywhere? Is this unused/vestigal code?
* chore: sync signature of ElectronExtensionsBrowserClient::IsValidContext() to upstream change
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4784198
* chore: add auto_pip_setting_helper.[cc,h] to chromium_src build
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4688277
Exiting upstream code used by chromium_src now depends on this new upstream class
* chore: bump chromium in DEPS to 118.0.5959.0
* chore: update add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
Xref: add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
manually adjust patch to minor upstream chagnes
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5961.0
* chore: bump chromium in DEPS to 118.0.5963.0
* chore: update patches
* 4780994: Rename various base files to "apple" since iOS uses them too
https://chromium-review.googlesource.com/c/chromium/src/+/4780994
* Many files moved from `mac` -> `apple`
This commit follows a handful of CLs that simply rename files/symbols to change `mac`
to `apple`
to signify their use across both macOS and iOS:
- 4784010: Move scoped_nsautorelease_pool to base/apple, leave a forwarding header
- 4790744: Move foundation_util to base/apple, leave a forwarding header
- 4790741: Move scoped_cftypreref to base/apple, leave a forwarding header
- 4787627: Move and rename macOS+iOS base/ files in PA to "apple"
- 4780399: Move OSStatus logging to base/apple
- 4787387: Remove forwarding headers
- 4781113: Rename message_pump_mac to "apple" because iOS uses it too
* fixup minor patch update error
A function param got dropped from this patch somewhere earlier
* chore: bump chromium in DEPS to 118.0.5965.2
* chore: update patches
* 4799213: Move ScopedTypeRef and ScopedCFTypeRef into base::apple::
https://chromium-review.googlesource.com/c/chromium/src/+/4799213
* Fix removed include to BrowserContext
In crrev.com/c/4767962 an include to BrowserContext was removed,
which was necessary for compilation. This broke only for us because
"chrome/browser/profiles/profile.h" includes that class, but we remove
all references to profiles.
* chore: bump chromium in DEPS to 118.0.5967.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5969.0
* chore: update patches
* chore: bump chromium in DEPS to 118.0.5971.0
* chore: bump chromium in DEPS to 118.0.5973.0
* chore: update patches
* 4772121: [OOPIF PDF] Replace PDFWebContentsHelper with PDFDocumentHelper
https://chromium-review.googlesource.com/c/chromium/src/+/4772121
* 4811164: [Extensions] Do some cleanup in ChromeManagementAPIDelegate.
https://chromium-review.googlesource.com/c/chromium/src/+/4811164
* 4809488: Remove duplicate dnd functionality between Web and Renderer prefs
https://chromium-review.googlesource.com/c/chromium/src/+/4809488
Given that this is no longer an option of web preferences, we should
consider deprecating this option and then removing it.
* chore: bump chromium in DEPS to 118.0.5975.0
* chore: update patches
* fixup! chore: add auto_pip_settings_helper.{cc|h} to chromium_src build
* Reland "[windows] Remove RegKey::DeleteEmptyKey"
Refs https://chromium-review.googlesource.com/c/chromium/src/+/4813255
* Ensure StrCat means StrCat
Refs https://chromium-review.googlesource.com/c/chromium/src/+/1117180
* fixup! Remove RegKey::DeleteEmptyKey
* Consistently reject large p and large q in DH
Refs https://boringssl-review.googlesource.com/c/boringssl/+/62226
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2023-09-01 06:54:59 +00:00
|
|
|
index c737a2ca1afb44083aef33c6aa4518bea68d1aba..879f1357b5129849c5a1aa1731cf769712569e9e 100644
|
2022-02-10 02:58:52 +00:00
|
|
|
--- a/ui/accessibility/platform/inspect/ax_transform_mac.mm
|
|
|
|
+++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm
|
2023-08-15 15:49:41 +00:00
|
|
|
@@ -108,6 +108,7 @@
|
2022-02-10 02:58:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-14 20:46:52 +00:00
|
|
|
+#if !IS_MAS_BUILD()
|
2022-02-10 02:58:52 +00:00
|
|
|
// AXTextMarker
|
|
|
|
if (IsAXTextMarker(value)) {
|
|
|
|
return AXTextMarkerToBaseValue(value, indexer);
|
2023-08-15 15:49:41 +00:00
|
|
|
@@ -117,6 +118,7 @@
|
2023-06-09 23:08:36 +00:00
|
|
|
if (IsAXTextMarkerRange(value)) {
|
2022-02-10 02:58:52 +00:00
|
|
|
return AXTextMarkerRangeToBaseValue(value, indexer);
|
2023-06-09 23:08:36 +00:00
|
|
|
}
|
2022-02-10 02:58:52 +00:00
|
|
|
+#endif
|
|
|
|
|
|
|
|
// Accessible object
|
2022-08-17 18:35:53 +00:00
|
|
|
if (AXElementWrapper::IsValidElement(value)) {
|