* chore: bump chromium in DEPS to 120.0.6049.0 * chore: update patches * chore: bump chromium in DEPS to 120.0.6050.0 * chore: update patches * 4910494: Reland "[autopip] Show autopip UI for video pip" https://chromium-review.googlesource.com/c/chromium/src/+/4910494 * 4812338: Move partition_alloc into a "partition_alloc" dir. https://chromium-review.googlesource.com/c/chromium/src/+/4812338 * [Extensions Cleanup] Remove mojom ViewType::kExtensionDialog https://chromium-review.googlesource.com/c/chromium/src/+/4909897 * 4894923: Force enable raw_ptrs pointer arithmetic check. https://chromium-review.googlesource.com/c/chromium/src/+/4894923 * gin: Prevent wrappables from being constructed from author code. https://chromium-review.googlesource.com/c/chromium/src/+/4905829 * chore: update patches * chore: bump chromium in DEPS to 120.0.6052.0 * chore: bump chromium in DEPS to 120.0.6054.0 * chore: bump chromium in DEPS to 120.0.6056.0 * chore: fix patches * 4918545: Reland "[autopip] Add permissions embargo" https://chromium-review.googlesource.com/c/chromium/src/+/4918545 * 4881761: UI bindings for visual logging with structured metrics. https://chromium-review.googlesource.com/c/chromium/src/+/4881761 * chore: bump chromium in DEPS to 120.0.6058.0 * chore: update patches * chore: bump chromium in DEPS to 120.0.6060.0 * chore: bump chromium in DEPS to 120.0.6061.0 * chore: bump chromium in DEPS to 120.0.6062.0 * chore: gen libc++ filenames * chore: update patches * 4911894: Move //c/b/ui/views/eye_dropper to //components https://chromium-review.googlesource.com/c/chromium/src/+/4911894 * chore: bump chromium in DEPS to 120.0.6064.0 * chore: bump chromium in DEPS to 120.0.6066.0 * chore: bump chromium in DEPS to 120.0.6068.0 * chore: bump chromium in DEPS to 120.0.6070.0 * chore: remove temp_prevent_unused_function_error.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4931270 * chore: add TransferDragSecurityInfo() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4928028 * mark TransferDragSecurityInfo() as NOTREACHED A follow-up to previous commit. I think this is commit is correct (i.e. that this function shouldn't get called) but am not positive, so I'm including it in a standalone commit in case we need to revert. * chore: update signature of OnPrivateNetworkAccessPermissionRequired() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4919478 Our impl is a no-op, so updating the signature is the only change. * chore: rebuild patches * chore: bump chromium in DEPS to 120.0.6072.0 * chore: update patches * chore: sync ParseMatchPattern() param order with upstream change Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4944243 * chore: update fix_crash_loading_non-standard_schemes_in_iframes.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4939602 * chore: rebuild patches * chore: bump chromium in DEPS to 120.0.6073.0 * chore: update patches * chore: bump chromium in DEPS to 120.0.6074.0 * chore: update disable_color_correct_rendering.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4908053 no manual changes; patch applied with fuzz 1 * chore: update fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4936315 minor manual sync to upstream code shear * chore: rebuild patches * chore: update ClearHttpAuthCache arguments Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4937937 adding ClearDataFilterPtr arg. Upstream added this arg, which is already present in other NetworkContext methods. Our code uses `nullptr` there. * chore: bump chromium in DEPS to 120.0.6076.0 * chore: update mas_disable_remote_accessibility.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4865412 minor manual sync to upstream code shear * chore: update disable_color_correct_rendering.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4942936 minor manual sync to upstream code shear * fix: move x11_util.h include to top of source file This is a short-term fix to unblock the roll. I will follow up a better fix in a standalone PR. * chore: rebuild patches * chore: bump chromium in DEPS to 120.0.6077.0 * chore: update patches * chore: bump chromium in DEPS to 120.0.6078.0 * chore: update patches * refactor: add BrowserProcessImpl::os_crypt_async() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4455776 This is one to keep an eye on. This commit copies the upstream impl, which appears to be an interim step with more upstream code changes still forthcoming. Xref: https://bugs.chromium.org/p/chromium/issues/detail?id=1373092 * fixup! refactor: add BrowserProcessImpl::os_crypt_async() chore: make 'gn check' happy * chore: remove ensure_messageports_get_gced_when_not_referenced.patch Xref: ensure_messageports_get_gced_when_not_referenced.patch no longer needed because upstreamed * chore: remove webrtc/pipewire_capturer_make_restore_tokens_re-usable_more_than_one_time.patch Xref: https://webrtc-review.googlesource.com/c/src/+/322621 no longer needed because upstreamed * chore: add //components/compose:buildflags dep Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4912601 needed by browser/ui/browser_dialogs.h * chore: update filenames.libcxx.gni node ./script/gen-libc++-filenames.js * test: fix UI.InspectorView -> UI.InspectorView.instance() --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
		
			
				
	
	
		
			447 lines
		
	
	
	
		
			14 KiB
			
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			447 lines
		
	
	
	
		
			14 KiB
			
		
	
	
	
		
			Diff
		
	
	
	
	
	
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 | 
						|
From: Cheng Zhao <zcbenz@gmail.com>
 | 
						|
Date: Tue, 9 Oct 2018 10:36:20 -0700
 | 
						|
Subject: mas: avoid some private APIs
 | 
						|
 | 
						|
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.
 | 
						|
 | 
						|
diff --git a/base/process/process_info_mac.cc b/base/process/process_info_mac.cc
 | 
						|
index 94a028be3c315edc0056408ab9ab41b6b001a1c1..0d830234edb5621f57e39f4a951d357a23f677c1 100644
 | 
						|
--- a/base/process/process_info_mac.cc
 | 
						|
+++ b/base/process/process_info_mac.cc
 | 
						|
@@ -8,15 +8,21 @@
 | 
						|
 #include <stdlib.h>
 | 
						|
 #include <unistd.h>
 | 
						|
 
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
 extern "C" {
 | 
						|
 pid_t responsibility_get_pid_responsible_for_pid(pid_t);
 | 
						|
 }
 | 
						|
+#endif
 | 
						|
 
 | 
						|
 namespace base {
 | 
						|
 
 | 
						|
 bool IsProcessSelfResponsible() {
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
   const pid_t pid = getpid();
 | 
						|
   return responsibility_get_pid_responsible_for_pid(pid) == pid;
 | 
						|
+#else
 | 
						|
+  return true;
 | 
						|
+#endif
 | 
						|
 }
 | 
						|
 
 | 
						|
 }  // namespace base
 | 
						|
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
 | 
						|
index d4db3b179725cb96bcbd0f73db7d52ef8b7522db..6afbf1defb0591d9fe59a81e6c74746d3e15f081 100644
 | 
						|
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
 | 
						|
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm
 | 
						|
@@ -10,9 +10,11 @@
 | 
						|
 #include "sandbox/mac/seatbelt.h"
 | 
						|
 #include "sandbox/mac/system_services.h"
 | 
						|
 
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
 extern "C" {
 | 
						|
 CGError CGSSetDenyWindowServerConnections(bool);
 | 
						|
 }
 | 
						|
+#endif
 | 
						|
 
 | 
						|
 namespace content {
 | 
						|
 
 | 
						|
@@ -22,6 +24,7 @@
 | 
						|
 // verifies there are no existing open connections), and then indicates that
 | 
						|
 // Chrome should continue execution without access to launchservicesd.
 | 
						|
 void DisableSystemServices() {
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
   // 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.
 | 
						|
@@ -30,6 +33,7 @@ void DisableSystemServices() {
 | 
						|
 
 | 
						|
   sandbox::DisableLaunchServices();
 | 
						|
   sandbox::DisableCoreServicesCheckFix();
 | 
						|
+#endif
 | 
						|
 }
 | 
						|
 
 | 
						|
 }  // namespace
 | 
						|
diff --git a/content/renderer/theme_helper_mac.mm b/content/renderer/theme_helper_mac.mm
 | 
						|
index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019bdd5280c 100644
 | 
						|
--- a/content/renderer/theme_helper_mac.mm
 | 
						|
+++ b/content/renderer/theme_helper_mac.mm
 | 
						|
@@ -8,10 +8,11 @@
 | 
						|
 
 | 
						|
 #include "base/strings/sys_string_conversions.h"
 | 
						|
 
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
 extern "C" {
 | 
						|
 bool CGFontRenderingGetFontSmoothingDisabled(void);
 | 
						|
 }
 | 
						|
-
 | 
						|
+#endif
 | 
						|
 namespace content {
 | 
						|
 
 | 
						|
 void SystemColorsDidChange(int aqua_color_variant) {
 | 
						|
@@ -24,8 +25,18 @@ void SystemColorsDidChange(int aqua_color_variant) {
 | 
						|
 }
 | 
						|
 
 | 
						|
 bool IsSubpixelAntialiasingAvailable() {
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
   // See https://trac.webkit.org/changeset/239306/webkit for more info.
 | 
						|
   return !CGFontRenderingGetFontSmoothingDisabled();
 | 
						|
+#else
 | 
						|
+  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];
 | 
						|
+#endif
 | 
						|
 }
 | 
						|
 
 | 
						|
 }  // namespace content
 | 
						|
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
 | 
						|
index 82836fc5fe3a7279f4fd15f297969162bc63089a..4276251875612430d1b197578f659736dbd86925 100644
 | 
						|
--- a/device/bluetooth/bluetooth_adapter_mac.mm
 | 
						|
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
 | 
						|
@@ -37,6 +37,7 @@
 | 
						|
 #include "device/bluetooth/bluetooth_socket_mac.h"
 | 
						|
 #include "device/bluetooth/public/cpp/bluetooth_address.h"
 | 
						|
 
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
 extern "C" {
 | 
						|
 // Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
 | 
						|
 // `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
 | 
						|
@@ -50,6 +51,7 @@
 | 
						|
 // [4] https://support.apple.com/kb/PH25091
 | 
						|
 void IOBluetoothPreferenceSetControllerPowerState(int state);
 | 
						|
 }
 | 
						|
+#endif
 | 
						|
 
 | 
						|
 namespace {
 | 
						|
 
 | 
						|
@@ -93,8 +95,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
 | 
						|
     : controller_state_function_(
 | 
						|
           base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
 | 
						|
                               base::Unretained(this))),
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
       power_state_function_(
 | 
						|
           base::BindRepeating(IOBluetoothPreferenceSetControllerPowerState)),
 | 
						|
+#endif
 | 
						|
       classic_discovery_manager_(
 | 
						|
           BluetoothDiscoveryManagerMac::CreateClassic(this)),
 | 
						|
       device_paired_status_callback_(
 | 
						|
@@ -243,8 +247,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
 | 
						|
 }
 | 
						|
 
 | 
						|
 bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
   power_state_function_.Run(base::strict_cast<int>(powered));
 | 
						|
   return true;
 | 
						|
+#else
 | 
						|
+  return false;
 | 
						|
+#endif
 | 
						|
 }
 | 
						|
 
 | 
						|
 base::WeakPtr<BluetoothLowEnergyAdapterApple>
 | 
						|
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
 | 
						|
index 03bceeedd5a46fdf6b47d7a6ba825743792e5378..5220b5823b78489437ab49ee0633bfe9930e495e 100644
 | 
						|
--- a/media/audio/mac/audio_manager_mac.cc
 | 
						|
+++ b/media/audio/mac/audio_manager_mac.cc
 | 
						|
@@ -995,7 +995,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
 | 
						|
 
 | 
						|
 void AudioManagerMac::InitializeOnAudioThread() {
 | 
						|
   DCHECK(GetTaskRunner()->BelongsToCurrentThread());
 | 
						|
-  InitializeCoreAudioDispatchOverride();
 | 
						|
+  // InitializeCoreAudioDispatchOverride();
 | 
						|
   power_observer_ = std::make_unique<AudioPowerObserver>();
 | 
						|
 }
 | 
						|
 
 | 
						|
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
 | 
						|
index a93e7cd74d2a9d692304ecf10279fae8e96bb695..3506d6ca555701bad6623cc1c614e0081892e42b 100644
 | 
						|
--- a/net/dns/dns_config_service_posix.cc
 | 
						|
+++ b/net/dns/dns_config_service_posix.cc
 | 
						|
@@ -130,8 +130,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
 | 
						|
 
 | 
						|
   bool Watch() override {
 | 
						|
     CheckOnCorrectSequence();
 | 
						|
-
 | 
						|
     bool success = true;
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
     if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged,
 | 
						|
                                                    base::Unretained(this)))) {
 | 
						|
       LOG(ERROR) << "DNS config watch failed to start.";
 | 
						|
@@ -148,6 +148,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
 | 
						|
       success = false;
 | 
						|
     }
 | 
						|
 #endif  // !BUILDFLAG(IS_IOS)
 | 
						|
+#endif
 | 
						|
     return success;
 | 
						|
   }
 | 
						|
 
 | 
						|
diff --git a/sandbox/mac/sandbox_compiler.cc b/sandbox/mac/sandbox_compiler.cc
 | 
						|
index f35d9ef2a2df3db8ecbf1d7b909c7b1cf33f3cd9..a710b8b4f851666fd65bb37f69ec2fa70259697b 100644
 | 
						|
--- a/sandbox/mac/sandbox_compiler.cc
 | 
						|
+++ b/sandbox/mac/sandbox_compiler.cc
 | 
						|
@@ -47,6 +47,7 @@ bool SandboxCompiler::SetParameter(const std::string& key,
 | 
						|
 }
 | 
						|
 
 | 
						|
 bool SandboxCompiler::CompileAndApplyProfile(std::string& error) {
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
   if (mode_ == Target::kSource) {
 | 
						|
     std::vector<const char*> params;
 | 
						|
 
 | 
						|
@@ -67,6 +68,9 @@ bool SandboxCompiler::CompileAndApplyProfile(std::string& error) {
 | 
						|
     }
 | 
						|
   }
 | 
						|
   return false;
 | 
						|
+#else
 | 
						|
+  return true;
 | 
						|
+#endif
 | 
						|
 }
 | 
						|
 
 | 
						|
 bool SandboxCompiler::CompilePolicyToProto(mac::SandboxPolicy& policy,
 | 
						|
diff --git a/sandbox/mac/seatbelt.cc b/sandbox/mac/seatbelt.cc
 | 
						|
index 15c835e118456394c0a00ac98c11241c14ca75bd..83759e5fbc252fa57ca2fa122873dfac3d61d46d 100644
 | 
						|
--- a/sandbox/mac/seatbelt.cc
 | 
						|
+++ b/sandbox/mac/seatbelt.cc
 | 
						|
@@ -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
 | 
						|
 }
 | 
						|
 
 | 
						|
 // static
 | 
						|
 bool Seatbelt::IsSandboxed() {
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
   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
 | 
						|
index 18479382a277cb2b25626ec8d31442bfd1377ee6..7d80d7fa8337523c3a70f317f883f0cc26c6f40b 100644
 | 
						|
--- a/sandbox/mac/seatbelt_extension.cc
 | 
						|
+++ b/sandbox/mac/seatbelt_extension.cc
 | 
						|
@@ -11,6 +11,7 @@
 | 
						|
 #include "base/notreached.h"
 | 
						|
 #include "sandbox/mac/seatbelt_extension_token.h"
 | 
						|
 
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
 // libsandbox private API.
 | 
						|
 extern "C" {
 | 
						|
 extern const char* APP_SANDBOX_READ;
 | 
						|
@@ -22,6 +23,7 @@ char* sandbox_extension_issue_file(const char* type,
 | 
						|
                                    const char* path,
 | 
						|
                                    uint32_t flags);
 | 
						|
 }
 | 
						|
+#endif
 | 
						|
 
 | 
						|
 namespace sandbox {
 | 
						|
 
 | 
						|
@@ -50,7 +52,11 @@ std::unique_ptr<SeatbeltExtension> SeatbeltExtension::FromToken(
 | 
						|
 
 | 
						|
 bool SeatbeltExtension::Consume() {
 | 
						|
   DCHECK(!token_.empty());
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
   handle_ = sandbox_extension_consume(token_.c_str());
 | 
						|
+#else
 | 
						|
+  handle_ = -1;
 | 
						|
+#endif
 | 
						|
   return handle_ > 0;
 | 
						|
 }
 | 
						|
 
 | 
						|
@@ -62,7 +68,11 @@ bool SeatbeltExtension::ConsumePermanently() {
 | 
						|
 }
 | 
						|
 
 | 
						|
 bool SeatbeltExtension::Revoke() {
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
   int rv = sandbox_extension_release(handle_);
 | 
						|
+#else
 | 
						|
+  int rv = -1;
 | 
						|
+#endif
 | 
						|
   handle_ = 0;
 | 
						|
   token_.clear();
 | 
						|
   return rv == 0;
 | 
						|
@@ -80,12 +90,14 @@ SeatbeltExtension::SeatbeltExtension(const std::string& token)
 | 
						|
 char* SeatbeltExtension::IssueToken(SeatbeltExtension::Type type,
 | 
						|
                                     const std::string& resource) {
 | 
						|
   switch (type) {
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
     case FILE_READ:
 | 
						|
       return sandbox_extension_issue_file(APP_SANDBOX_READ, resource.c_str(),
 | 
						|
                                           0);
 | 
						|
     case FILE_READ_WRITE:
 | 
						|
       return sandbox_extension_issue_file(APP_SANDBOX_READ_WRITE,
 | 
						|
                                           resource.c_str(), 0);
 | 
						|
+#endif
 | 
						|
     default:
 | 
						|
       NOTREACHED();
 | 
						|
       return nullptr;
 | 
						|
diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm
 | 
						|
index c737a2ca1afb44083aef33c6aa4518bea68d1aba..879f1357b5129849c5a1aa1731cf769712569e9e 100644
 | 
						|
--- a/ui/accessibility/platform/inspect/ax_transform_mac.mm
 | 
						|
+++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm
 | 
						|
@@ -108,6 +108,7 @@
 | 
						|
     }
 | 
						|
   }
 | 
						|
 
 | 
						|
+#if !IS_MAS_BUILD()
 | 
						|
   // AXTextMarker
 | 
						|
   if (IsAXTextMarker(value)) {
 | 
						|
     return AXTextMarkerToBaseValue(value, indexer);
 | 
						|
@@ -117,6 +118,7 @@
 | 
						|
   if (IsAXTextMarkerRange(value)) {
 | 
						|
     return AXTextMarkerRangeToBaseValue(value, indexer);
 | 
						|
   }
 | 
						|
+#endif
 | 
						|
 
 | 
						|
   // Accessible object
 | 
						|
   if (AXElementWrapper::IsValidElement(value)) {
 |