0

Move mach_logging to base/apple, leave a forwarding header

Crashpad is not yet updated for the new location, so leave a
forwarding header to be removed later.

Bug: 1444927
Change-Id: I8b1e2c9a3a59239f63d6ba7dc562b2221e67ec56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4784749
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1184356}
This commit is contained in:
Avi Drissman
2023-08-16 20:35:49 +00:00
committed by Chromium LUCI CQ
parent 07b34b08ca
commit 0b20071f09
45 changed files with 225 additions and 215 deletions

@ -1953,6 +1953,8 @@ component("base") {
"apple/call_with_eh_frame_asm.S",
"apple/dispatch_source_mach.cc",
"apple/dispatch_source_mach.h",
"apple/mach_logging.cc",
"apple/mach_logging.h",
"apple/osstatus_logging.h",
"apple/osstatus_logging.mm",
"apple/owned_objc.h",
@ -1968,8 +1970,6 @@ component("base") {
"files/file_util_apple.mm",
"mac/foundation_util.h",
"mac/foundation_util.mm",
"mac/mach_logging.cc",
"mac/mach_logging.h",
"mac/scoped_mach_port.cc",
"mac/scoped_mach_port.h",
"mac/scoped_mach_vm.cc",

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include <iomanip>
#include <string>
@ -38,13 +38,10 @@ MachLogMessage::MachLogMessage(const char* file_path,
int line,
LogSeverity severity,
mach_error_t mach_err)
: LogMessage(file_path, line, severity),
mach_err_(mach_err) {
}
: LogMessage(file_path, line, severity), mach_err_(mach_err) {}
MachLogMessage::~MachLogMessage() {
stream() << ": "
<< mach_error_string(mach_err_)
stream() << ": " << mach_error_string(mach_err_)
<< FormatMachErrorNumber(mach_err_);
}
@ -54,13 +51,10 @@ BootstrapLogMessage::BootstrapLogMessage(const char* file_path,
int line,
LogSeverity severity,
kern_return_t bootstrap_err)
: LogMessage(file_path, line, severity),
bootstrap_err_(bootstrap_err) {
}
: LogMessage(file_path, line, severity), bootstrap_err_(bootstrap_err) {}
BootstrapLogMessage::~BootstrapLogMessage() {
stream() << ": "
<< bootstrap_strerror(bootstrap_err_);
stream() << ": " << bootstrap_strerror(bootstrap_err_);
switch (bootstrap_err_) {
case BOOTSTRAP_SUCCESS:

171
base/apple/mach_logging.h Normal file

@ -0,0 +1,171 @@
// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_APPLE_MACH_LOGGING_H_
#define BASE_APPLE_MACH_LOGGING_H_
#include <mach/mach.h>
#include "base/base_export.h"
#include "base/logging.h"
#include "build/blink_buildflags.h"
#include "build/build_config.h"
// Use the MACH_LOG family of macros along with a mach_error_t (kern_return_t)
// containing a Mach error. The error value will be decoded so that logged
// messages explain the error.
//
// Use the BOOTSTRAP_LOG family of macros specifically for errors that occur
// while interoperating with the bootstrap subsystem. These errors will first
// be looked up as bootstrap error messages. If no match is found, they will
// be treated as generic Mach errors, as in MACH_LOG.
//
// Examples:
//
// kern_return_t kr = mach_timebase_info(&info);
// if (kr != KERN_SUCCESS) {
// MACH_LOG(ERROR, kr) << "mach_timebase_info";
// }
//
// kr = vm_deallocate(task, address, size);
// MACH_DCHECK(kr == KERN_SUCCESS, kr) << "vm_deallocate";
namespace logging {
class BASE_EXPORT MachLogMessage : public logging::LogMessage {
public:
MachLogMessage(const char* file_path,
int line,
LogSeverity severity,
mach_error_t mach_err);
MachLogMessage(const MachLogMessage&) = delete;
MachLogMessage& operator=(const MachLogMessage&) = delete;
~MachLogMessage() override;
private:
mach_error_t mach_err_;
};
} // namespace logging
#if DCHECK_IS_ON()
#define MACH_DVLOG_IS_ON(verbose_level) VLOG_IS_ON(verbose_level)
#else
#define MACH_DVLOG_IS_ON(verbose_level) 0
#endif
#define MACH_LOG_STREAM(severity, mach_err) \
COMPACT_GOOGLE_LOG_EX_ ## severity(MachLogMessage, mach_err).stream()
#define MACH_VLOG_STREAM(verbose_level, mach_err) \
logging::MachLogMessage(__FILE__, __LINE__, \
-verbose_level, mach_err).stream()
#define MACH_LOG(severity, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), LOG_IS_ON(severity))
#define MACH_LOG_IF(severity, condition, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \
LOG_IS_ON(severity) && (condition))
#define MACH_VLOG(verbose_level, mach_err) \
LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
VLOG_IS_ON(verbose_level))
#define MACH_VLOG_IF(verbose_level, condition, mach_err) \
LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
VLOG_IS_ON(verbose_level) && (condition))
#define MACH_CHECK(condition, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), !(condition)) \
<< "Check failed: " # condition << ". "
#define MACH_DLOG(severity, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), DLOG_IS_ON(severity))
#define MACH_DLOG_IF(severity, condition, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \
DLOG_IS_ON(severity) && (condition))
#define MACH_DVLOG(verbose_level, mach_err) \
LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
MACH_DVLOG_IS_ON(verbose_level))
#define MACH_DVLOG_IF(verbose_level, condition, mach_err) \
LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
MACH_DVLOG_IS_ON(verbose_level) && (condition))
#define MACH_DCHECK(condition, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), \
DCHECK_IS_ON() && !(condition)) \
<< "Check failed: " #condition << ". "
#if BUILDFLAG(USE_BLINK)
namespace logging {
class BASE_EXPORT BootstrapLogMessage : public logging::LogMessage {
public:
BootstrapLogMessage(const char* file_path,
int line,
LogSeverity severity,
kern_return_t bootstrap_err);
BootstrapLogMessage(const BootstrapLogMessage&) = delete;
BootstrapLogMessage& operator=(const BootstrapLogMessage&) = delete;
~BootstrapLogMessage() override;
private:
kern_return_t bootstrap_err_;
};
} // namespace logging
#define BOOTSTRAP_DVLOG_IS_ON MACH_DVLOG_IS_ON
#define BOOTSTRAP_LOG_STREAM(severity, bootstrap_err) \
COMPACT_GOOGLE_LOG_EX_ ## severity(BootstrapLogMessage, \
bootstrap_err).stream()
#define BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err) \
logging::BootstrapLogMessage(__FILE__, __LINE__, \
-verbose_level, bootstrap_err).stream()
#define BOOTSTRAP_LOG(severity, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, \
bootstrap_err), LOG_IS_ON(severity))
#define BOOTSTRAP_LOG_IF(severity, condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
LOG_IS_ON(severity) && (condition))
#define BOOTSTRAP_VLOG(verbose_level, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
VLOG_IS_ON(verbose_level))
#define BOOTSTRAP_VLOG_IF(verbose_level, condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
VLOG_IS_ON(verbose_level) && (condition))
#define BOOTSTRAP_CHECK(condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), !(condition)) \
<< "Check failed: " # condition << ". "
#define BOOTSTRAP_DLOG(severity, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
DLOG_IS_ON(severity))
#define BOOTSTRAP_DLOG_IF(severity, condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
DLOG_IS_ON(severity) && (condition))
#define BOOTSTRAP_DVLOG(verbose_level, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
BOOTSTRAP_DVLOG_IS_ON(verbose_level))
#define BOOTSTRAP_DVLOG_IF(verbose_level, condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
BOOTSTRAP_DVLOG_IS_ON(verbose_level) && (condition))
#define BOOTSTRAP_DCHECK(condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), \
DCHECK_IS_ON() && !(condition)) \
<< "Check failed: " #condition << ". "
#endif // BUILDFLAG(USE_BLINK)
#endif // BASE_APPLE_MACH_LOGGING_H_

@ -1,171 +1,16 @@
// Copyright 2014 The Chromium Authors
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_MAC_MACH_LOGGING_H_
#define BASE_MAC_MACH_LOGGING_H_
#include <mach/mach.h>
#include "base/apple/mach_logging.h"
#include "base/base_export.h"
#include "base/logging.h"
#include "build/blink_buildflags.h"
#include "build/build_config.h"
// This is a forwarding header so that Crashpad can continue to build correctly
// until mini_chromium and then it are updated and rolled.
// Use the MACH_LOG family of macros along with a mach_error_t (kern_return_t)
// containing a Mach error. The error value will be decoded so that logged
// messages explain the error.
//
// Use the BOOTSTRAP_LOG family of macros specifically for errors that occur
// while interoperating with the bootstrap subsystem. These errors will first
// be looked up as bootstrap error messages. If no match is found, they will
// be treated as generic Mach errors, as in MACH_LOG.
//
// Examples:
//
// kern_return_t kr = mach_timebase_info(&info);
// if (kr != KERN_SUCCESS) {
// MACH_LOG(ERROR, kr) << "mach_timebase_info";
// }
//
// kr = vm_deallocate(task, address, size);
// MACH_DCHECK(kr == KERN_SUCCESS, kr) << "vm_deallocate";
namespace logging {
class BASE_EXPORT MachLogMessage : public logging::LogMessage {
public:
MachLogMessage(const char* file_path,
int line,
LogSeverity severity,
mach_error_t mach_err);
MachLogMessage(const MachLogMessage&) = delete;
MachLogMessage& operator=(const MachLogMessage&) = delete;
~MachLogMessage() override;
private:
mach_error_t mach_err_;
};
} // namespace logging
#if DCHECK_IS_ON()
#define MACH_DVLOG_IS_ON(verbose_level) VLOG_IS_ON(verbose_level)
#else
#define MACH_DVLOG_IS_ON(verbose_level) 0
#endif
#define MACH_LOG_STREAM(severity, mach_err) \
COMPACT_GOOGLE_LOG_EX_ ## severity(MachLogMessage, mach_err).stream()
#define MACH_VLOG_STREAM(verbose_level, mach_err) \
logging::MachLogMessage(__FILE__, __LINE__, \
-verbose_level, mach_err).stream()
#define MACH_LOG(severity, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), LOG_IS_ON(severity))
#define MACH_LOG_IF(severity, condition, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \
LOG_IS_ON(severity) && (condition))
#define MACH_VLOG(verbose_level, mach_err) \
LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
VLOG_IS_ON(verbose_level))
#define MACH_VLOG_IF(verbose_level, condition, mach_err) \
LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
VLOG_IS_ON(verbose_level) && (condition))
#define MACH_CHECK(condition, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), !(condition)) \
<< "Check failed: " # condition << ". "
#define MACH_DLOG(severity, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), DLOG_IS_ON(severity))
#define MACH_DLOG_IF(severity, condition, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(severity, mach_err), \
DLOG_IS_ON(severity) && (condition))
#define MACH_DVLOG(verbose_level, mach_err) \
LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
MACH_DVLOG_IS_ON(verbose_level))
#define MACH_DVLOG_IF(verbose_level, condition, mach_err) \
LAZY_STREAM(MACH_VLOG_STREAM(verbose_level, mach_err), \
MACH_DVLOG_IS_ON(verbose_level) && (condition))
#define MACH_DCHECK(condition, mach_err) \
LAZY_STREAM(MACH_LOG_STREAM(FATAL, mach_err), \
DCHECK_IS_ON() && !(condition)) \
<< "Check failed: " #condition << ". "
#if BUILDFLAG(USE_BLINK)
namespace logging {
class BASE_EXPORT BootstrapLogMessage : public logging::LogMessage {
public:
BootstrapLogMessage(const char* file_path,
int line,
LogSeverity severity,
kern_return_t bootstrap_err);
BootstrapLogMessage(const BootstrapLogMessage&) = delete;
BootstrapLogMessage& operator=(const BootstrapLogMessage&) = delete;
~BootstrapLogMessage() override;
private:
kern_return_t bootstrap_err_;
};
} // namespace logging
#define BOOTSTRAP_DVLOG_IS_ON MACH_DVLOG_IS_ON
#define BOOTSTRAP_LOG_STREAM(severity, bootstrap_err) \
COMPACT_GOOGLE_LOG_EX_ ## severity(BootstrapLogMessage, \
bootstrap_err).stream()
#define BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err) \
logging::BootstrapLogMessage(__FILE__, __LINE__, \
-verbose_level, bootstrap_err).stream()
#define BOOTSTRAP_LOG(severity, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, \
bootstrap_err), LOG_IS_ON(severity))
#define BOOTSTRAP_LOG_IF(severity, condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
LOG_IS_ON(severity) && (condition))
#define BOOTSTRAP_VLOG(verbose_level, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
VLOG_IS_ON(verbose_level))
#define BOOTSTRAP_VLOG_IF(verbose_level, condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
VLOG_IS_ON(verbose_level) && (condition))
#define BOOTSTRAP_CHECK(condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), !(condition)) \
<< "Check failed: " # condition << ". "
#define BOOTSTRAP_DLOG(severity, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
DLOG_IS_ON(severity))
#define BOOTSTRAP_DLOG_IF(severity, condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(severity, bootstrap_err), \
DLOG_IS_ON(severity) && (condition))
#define BOOTSTRAP_DVLOG(verbose_level, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
BOOTSTRAP_DVLOG_IS_ON(verbose_level))
#define BOOTSTRAP_DVLOG_IF(verbose_level, condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_VLOG_STREAM(verbose_level, bootstrap_err), \
BOOTSTRAP_DVLOG_IS_ON(verbose_level) && (condition))
#define BOOTSTRAP_DCHECK(condition, bootstrap_err) \
LAZY_STREAM(BOOTSTRAP_LOG_STREAM(FATAL, bootstrap_err), \
DCHECK_IS_ON() && !(condition)) \
<< "Check failed: " #condition << ". "
#endif // BUILDFLAG(USE_BLINK)
// TODO(https://crbug.com/1444927): Update mini_chromium, update Crashpad, roll
// Crashpad, and then delete this forwarding header.
#endif // BASE_MAC_MACH_LOGGING_H_

@ -9,10 +9,10 @@
#include <utility>
#include "base/apple/mach_logging.h"
#include "base/containers/buffer_iterator.h"
#include "base/logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_mach_msg_destroy.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"

@ -4,8 +4,8 @@
#include "base/mac/mach_port_rendezvous.h"
#include "base/apple/mach_logging.h"
#include "base/logging.h"
#include "base/mac/mach_logging.h"
#include "base/synchronization/lock.h"
#include "testing/libfuzzer/fuzzers/mach/mach_message_converter.h"
#include "testing/libfuzzer/proto/lpm_interface.h"

@ -8,9 +8,9 @@
#include <utility>
#include "base/apple/mach_logging.h"
#include "base/at_exit.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mach_logging.h"
#include "base/strings/stringprintf.h"
#include "base/test/multiprocess_test.h"
#include "base/test/test_timeouts.h"

@ -4,7 +4,7 @@
#include "base/mac/scoped_mach_port.h"
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
namespace base::mac {
namespace internal {

@ -4,7 +4,7 @@
#include "base/mac/scoped_mach_vm.h"
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
namespace base::mac {

@ -7,7 +7,7 @@
#include "base/logging.h"
#include <mach/vm_map.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
namespace base {

@ -6,7 +6,7 @@
#include <mach/vm_map.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "base/mac/scoped_mach_vm.h"
namespace base::subtle {

@ -12,7 +12,7 @@
#if BUILDFLAG(IS_APPLE)
#include <mach/thread_policy.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/threading/threading_features.h"

@ -8,11 +8,11 @@
#include <atomic>
#include "base/apple/mach_logging.h"
#include "base/auto_reset.h"
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/notreached.h"
#include "base/posix/eintr_wrapper.h"

@ -14,8 +14,8 @@
#include <iterator>
#include <memory>
#include "base/apple/mach_logging.h"
#include "base/feature_list.h"
#include "base/mac/mach_logging.h"
#include "base/memory/free_deleter.h"
#include "third_party/abseil-cpp/absl/types/optional.h"

@ -11,9 +11,9 @@
#include <stdint.h>
#include <sys/sysctl.h>
#include "base/apple/mach_logging.h"
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#include "base/memory/ptr_util.h"
#include "base/numerics/safe_math.h"

@ -15,9 +15,9 @@
#include <sys/sysctl.h>
#include <memory>
#include "base/apple/mach_logging.h"
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
#include "base/memory/ptr_util.h"
#include "base/process/process_metrics_iocounters.h"
#include "base/time/time.h"

@ -10,8 +10,8 @@
#include <vector>
#include "base/apple/mach_logging.h"
#include "base/check.h"
#include "base/mac/mach_logging.h"
#include "base/profiler/profile_builder.h"
#include "build/build_config.h"

@ -10,8 +10,8 @@
#include <limits>
#include <memory>
#include "base/apple/mach_logging.h"
#include "base/files/scoped_file.h"
#include "base/mac/mach_logging.h"
#include "base/notreached.h"
#include "base/posix/eintr_wrapper.h"
#include "base/threading/scoped_blocking_call.h"

@ -15,12 +15,12 @@
#include <algorithm>
#include <atomic>
#include "base/apple/mach_logging.h"
#include "base/feature_list.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/threading/thread_id_name_manager.h"
#include "base/threading/threading_features.h"

@ -14,8 +14,8 @@
#include <sys/types.h>
#include <time.h>
#include "base/apple/mach_logging.h"
#include "base/logging.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_mach_port.h"
#include "base/numerics/safe_conversions.h"

@ -10,6 +10,7 @@
#include <utility>
#include "base/apple/bundle_locations.h"
#include "base/apple/mach_logging.h"
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
@ -18,7 +19,6 @@
#include "base/mac/foundation_util.h"
#include "base/mac/launch_application.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"

@ -10,8 +10,8 @@
#include <memory>
#include <utility>
#include "base/apple/mach_logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_mach_msg_destroy.h"
#include "base/strings/stringprintf.h"
#include "chrome/common/mac/app_mode_common.h"

@ -21,6 +21,7 @@
#include "base/apple/bridging.h"
#include "base/apple/bundle_locations.h"
#include "base/apple/mach_logging.h"
#include "base/apple/osstatus_logging.h"
#include "base/auto_reset.h"
#include "base/command_line.h"
@ -29,7 +30,6 @@
#include "base/mac/authorization_util.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_authorizationref.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_ioobject.h"

@ -8,8 +8,8 @@
#include <IOKit/IOBSD.h>
#include <IOKit/storage/IOMedia.h>
#include "base/apple/mach_logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_ioobject.h"
#include "base/strings/sys_string_conversions.h"

@ -14,8 +14,8 @@
#include <string>
#include <utility>
#include "base/apple/mach_logging.h"
#include "base/logging.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#include "base/strings/strcat.h"
#include "base/threading/platform_thread.h"

@ -12,7 +12,7 @@
#include <mach/mach.h>
#include <mach/message.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "mojo/public/cpp/platform/platform_channel.h"
#include "mojo/public/cpp/platform/platform_channel_endpoint.h"
#endif

@ -10,9 +10,9 @@
#include <memory>
#include "base/apple/dispatch_source_mach.h"
#include "base/apple/mach_logging.h"
#include "base/functional/bind.h"
#include "base/functional/callback_forward.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_mach_msg_destroy.h"
#include "base/mac/scoped_mach_port.h"
#include "base/sequence_checker.h"

@ -4,8 +4,8 @@
#include "components/power_metrics/mach_time_mac.h"
#include "base/apple/mach_logging.h"
#include "base/check.h"
#include "base/mac/mach_logging.h"
namespace power_metrics {

@ -8,8 +8,8 @@
#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIKit.h>
#include "base/apple/mach_logging.h"
#include "base/logging.h"
#include "base/mac/mach_logging.h"
#include "base/numerics/checked_math.h"
#include "components/viz/common/frame_sinks/begin_frame_args.h"

@ -4,12 +4,12 @@
#include "content/browser/child_process_task_port_provider_mac.h"
#include "base/apple/mach_logging.h"
#include "base/containers/cxx20_erase.h"
#include "base/debug/crash_logging.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mach_logging.h"
#include "base/no_destructor.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"

@ -8,7 +8,7 @@
#include <mach/mach_vm.h>
#include <memory>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "base/memory/ptr_util.h"
#include "base/time/time.h"

@ -35,7 +35,7 @@
#include "services/video_capture/video_capture_service_impl.h"
#if BUILDFLAG(IS_MAC)
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "sandbox/mac/system_services.h"
#include "sandbox/policy/sandbox.h"
#endif

@ -6,7 +6,7 @@
#include <stdint.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
namespace IPC {
namespace internal {

@ -29,7 +29,7 @@
#include "mojo/core/embedder/features.h"
#if BUILDFLAG(MOJO_USE_APPLE_CHANNEL)
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#elif BUILDFLAG(IS_WIN)
#include "base/win/win_util.h"
#endif

@ -14,12 +14,12 @@
#include <utility>
#include <vector>
#include "base/apple/mach_logging.h"
#include "base/containers/buffer_iterator.h"
#include "base/containers/circular_deque.h"
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_mach_msg_destroy.h"
#include "base/mac/scoped_mach_port.h"
#include "base/mac/scoped_mach_vm.h"

@ -4,8 +4,8 @@
#include <list>
#include "base/apple/mach_logging.h"
#include "base/logging.h"
#include "base/mac/mach_logging.h"
#include "base/message_loop/message_pump_type.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_executor.h"

@ -24,7 +24,7 @@
#if BUILDFLAG(IS_APPLE)
#include <mach/mach.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#endif

@ -7,8 +7,8 @@
#include <mach/port.h>
#include <servers/bootstrap.h>
#include "base/apple/mach_logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"

@ -40,7 +40,7 @@
#if BUILDFLAG(MOJO_USE_APPLE_CHANNEL)
#include <mach/port.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#endif

@ -22,7 +22,7 @@
#elif BUILDFLAG(IS_APPLE)
#include <mach/vm_map.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#endif

@ -9,8 +9,8 @@
#include <utility>
#include "base/apple/mach_logging.h"
#include "base/containers/buffer_iterator.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_mach_msg_destroy.h"
namespace mach_fuzzer {

@ -9,9 +9,9 @@
#include <IOKit/ps/IOPSKeys.h>
#include <cstdint>
#include "base/apple/mach_logging.h"
#include "base/logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mach_logging.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_ioobject.h"
#include "base/memory/ptr_util.h"

@ -8,7 +8,7 @@
#include <mach/mach_time.h>
#include <mach/mach_vm.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#include "base/time/time.h"
#include "tools/memory/simulator/utils.h"

@ -7,7 +7,7 @@
#include <mach/mach.h>
#include <mach/mach_time.h>
#include "base/mac/mach_logging.h"
#include "base/apple/mach_logging.h"
#include "base/mac/scoped_mach_port.h"
#include "base/time/time.h"
#include "tools/memory/simulator/utils.h"

@ -9,12 +9,12 @@
#include <stddef.h>
#include <stdint.h>
#include "base/apple/mach_logging.h"
#include "base/bits.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/trace_event/trace_event.h"
#include "ui/gfx/buffer_format_util.h"