diff --git a/client/BUILD.gn b/client/BUILD.gn index bd150ab9..16838df8 100644 --- a/client/BUILD.gn +++ b/client/BUILD.gn @@ -79,10 +79,7 @@ crashpad_static_library("client") { "../util", ] - deps = [ - ":common", - "$mini_chromium_source_parent:chromeos_buildflags", - ] + deps = [ ":common" ] if (crashpad_is_win) { libs = [ "rpcrt4.lib" ] diff --git a/client/crashpad_client.h b/client/crashpad_client.h index 6872d1f3..41f03211 100644 --- a/client/crashpad_client.h +++ b/client/crashpad_client.h @@ -25,7 +25,6 @@ #include "base/files/file_path.h" #include "build/build_config.h" -#include "build/chromeos_buildflags.h" #include "util/file/file_io.h" #if !BUILDFLAG(IS_FUCHSIA) @@ -799,7 +798,7 @@ class CrashpadClient { static void UseSystemDefaultHandler(); #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) //! \brief Sets a timestamp on the signal handler to be passed on to //! crashpad_handler and then eventually Chrome OS's crash_reporter. //! diff --git a/client/crashpad_client_linux.cc b/client/crashpad_client_linux.cc index 1d79be7a..8241d23a 100644 --- a/client/crashpad_client_linux.cc +++ b/client/crashpad_client_linux.cc @@ -34,7 +34,6 @@ #include "base/logging.h" #include "base/strings/stringprintf.h" #include "build/build_config.h" -#include "build/chromeos_buildflags.h" #include "client/client_argv_handling.h" #include "third_party/lss/lss.h" #include "util/file/file_io.h" @@ -406,7 +405,7 @@ class RequestCrashDumpHandler : public SignalHandler { ExceptionHandlerProtocol::ClientInformation info = {}; info.exception_information_address = FromPointerCast(&GetExceptionInfo()); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) info.crash_loop_before_time = crash_loop_before_time_; #endif @@ -414,7 +413,7 @@ class RequestCrashDumpHandler : public SignalHandler { client.RequestCrashDump(info); } -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) void SetCrashLoopBefore(uint64_t crash_loop_before_time) { crash_loop_before_time_ = crash_loop_before_time; } @@ -436,7 +435,7 @@ class RequestCrashDumpHandler : public SignalHandler { ScopedFileHandle sock_to_handler_; pid_t handler_pid_ = -1; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // An optional UNIX timestamp passed to us from Chrome. // This will pass to crashpad_handler and then to Chrome OS crash_reporter. // This should really be a time_t, but it's basically an opaque value (we @@ -763,7 +762,7 @@ void CrashpadClient::SetUnhandledSignals(const std::set& signals) { unhandled_signals_ = signals; } -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) // static void CrashpadClient::SetCrashLoopBefore(uint64_t crash_loop_before_time) { auto request_crash_dump_handler = RequestCrashDumpHandler::Get(); diff --git a/handler/BUILD.gn b/handler/BUILD.gn index 104e8502..368fef05 100644 --- a/handler/BUILD.gn +++ b/handler/BUILD.gn @@ -74,7 +74,6 @@ static_library("handler") { ":common", "../minidump", "../snapshot", - "../third_party/mini_chromium:chromeos_buildflags", "../tools:tool_support", ] diff --git a/handler/handler_main.cc b/handler/handler_main.cc index 7e908c0a..6eca8415 100644 --- a/handler/handler_main.cc +++ b/handler/handler_main.cc @@ -38,7 +38,6 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" -#include "build/chromeos_buildflags.h" #include "client/crash_report_database.h" #include "client/crashpad_client.h" #include "client/crashpad_info.h" @@ -57,7 +56,7 @@ #include "util/string/split_string.h" #include "util/synchronization/semaphore.h" -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_CHROMEOS) #include "handler/linux/cros_crash_report_exception_handler.h" #endif @@ -192,7 +191,7 @@ void Usage(const base::FilePath& me) { " --url=URL send crash reports to this Breakpad server URL,\n" " only if uploads are enabled for the database\n" // clang-format on -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_CHROMEOS) // clang-format off " --use-cros-crash-reporter\n" " pass crash reports to /sbin/crash_reporter\n" @@ -205,7 +204,7 @@ void Usage(const base::FilePath& me) { " crash_reporter, thus skipping metrics consent\n" " checks\n" // clang-format on -#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_ANDROID) // clang-format off " --write-minidump-to-log write minidump to log\n" @@ -248,11 +247,11 @@ struct Options { bool periodic_tasks; bool rate_limit; bool upload_gzip; -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_CHROMEOS) bool use_cros_crash_reporter = false; base::FilePath minidump_dir_for_tests; bool always_allow_feedback = false; -#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#endif // BUILDFLAG(IS_CHROMEOS) #if defined(ATTACHMENTS_SUPPORTED) std::vector attachments; #endif // ATTACHMENTS_SUPPORTED @@ -551,7 +550,7 @@ class ScopedStoppable { void InitCrashpadLogging() { logging::LoggingSettings settings; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS) settings.logging_dest = logging::LOG_TO_FILE; settings.log_file_path = "/var/log/chrome/chrome"; #elif BUILDFLAG(IS_WIN) @@ -622,11 +621,11 @@ int HandlerMain(int argc, kOptionTraceParentWithException, #endif kOptionURL, -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_CHROMEOS) kOptionUseCrosCrashReporter, kOptionMinidumpDirForTests, kOptionAlwaysAllowFeedback, -#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_ANDROID) kOptionWriteMinidumpToLog, #endif // BUILDFLAG(IS_ANDROID) @@ -706,7 +705,7 @@ int HandlerMain(int argc, #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_ANDROID) {"url", required_argument, nullptr, kOptionURL}, -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_CHROMEOS) {"use-cros-crash-reporter", no_argument, nullptr, @@ -716,7 +715,7 @@ int HandlerMain(int argc, nullptr, kOptionMinidumpDirForTests}, {"always-allow-feedback", no_argument, nullptr, kOptionAlwaysAllowFeedback}, -#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_ANDROID) {"write-minidump-to-log", no_argument, nullptr, kOptionWriteMinidumpToLog}, #endif // BUILDFLAG(IS_ANDROID) @@ -879,7 +878,7 @@ int HandlerMain(int argc, options.url = optarg; break; } -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_CHROMEOS) case kOptionUseCrosCrashReporter: { options.use_cros_crash_reporter = true; break; @@ -893,7 +892,7 @@ int HandlerMain(int argc, options.always_allow_feedback = true; break; } -#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_ANDROID) case kOptionWriteMinidumpToLog: { options.write_minidump_to_log = true; @@ -1042,7 +1041,7 @@ int HandlerMain(int argc, std::unique_ptr exception_handler; #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_CHROMEOS) if (options.use_cros_crash_reporter) { auto cros_handler = std::make_unique( database.get(), @@ -1085,7 +1084,7 @@ int HandlerMain(int argc, false, #endif // BUILDFLAG(IS_LINUX) user_stream_sources); -#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) if (options.exception_information_address) { diff --git a/handler/linux/cros_crash_report_exception_handler.cc b/handler/linux/cros_crash_report_exception_handler.cc index 25637408..51486a10 100644 --- a/handler/linux/cros_crash_report_exception_handler.cc +++ b/handler/linux/cros_crash_report_exception_handler.cc @@ -257,8 +257,6 @@ bool CrosCrashReportExceptionHandler::HandleExceptionWithConnection( constexpr int32_t kFixedVersion = 15363; // TODO(https://crbug.com/1420445): Remove this check (and the // CRASHPAD_IS_IN_CHROMIUM defines) when M115 branches. - // (Lacros is guaranteed not to be more than 2 milestones ahead of ash, and - // M113 on ash has the relevant crash_reporter change.) if (major_version >= kFixedVersion) { // Used to distinguish between non-fatal and fatal crashes. const ExceptionSnapshot* const exception_snapshot = snapshot->Exception(); diff --git a/third_party/mini_chromium/BUILD.gn b/third_party/mini_chromium/BUILD.gn index 9d4ff01c..61a60ffa 100644 --- a/third_party/mini_chromium/BUILD.gn +++ b/third_party/mini_chromium/BUILD.gn @@ -49,17 +49,3 @@ group("build") { public_deps = [ "//third_party/mini_chromium/mini_chromium/build" ] } } - -group("chromeos_buildflags") { - if (crashpad_is_in_chromium) { - public_deps = [ "//build:chromeos_buildflags" ] - } else if (crashpad_is_standalone) { - public_deps = [ "mini_chromium/build:chromeos_buildflags" ] - } else if (crashpad_is_in_fuchsia) { - public_deps = [ mini_chromium_import_root + "/build:chromeos_buildflags" ] - } else if (crashpad_is_external) { - public_deps = [ "../../../../mini_chromium/mini_chromium/build:chromeos_buildflags" ] - } else if (crashpad_is_in_dart) { - public_deps = [ "//third_party/mini_chromium/mini_chromium/build:chromeos_buildflags" ] - } -} diff --git a/util/BUILD.gn b/util/BUILD.gn index 8d037fea..ea2e95c7 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -573,10 +573,7 @@ crashpad_static_library("util") { "../third_party/zlib", ] - deps += [ - "$mini_chromium_source_parent:base", - "$mini_chromium_source_parent:chromeos_buildflags", - ] + deps = [ "$mini_chromium_source_parent:base" ] configs = [ "../build:flock_always_supported_defines" ] diff --git a/util/posix/scoped_mmap.cc b/util/posix/scoped_mmap.cc index b9b42480..ee76c856 100644 --- a/util/posix/scoped_mmap.cc +++ b/util/posix/scoped_mmap.cc @@ -24,19 +24,14 @@ #include "base/numerics/safe_conversions.h" #include "base/numerics/safe_math.h" #include "build/build_config.h" -#include "build/chromeos_buildflags.h" -// TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is -// complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) #include "third_party/lss/lss.h" #endif namespace { -// TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is -// complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) void* CallMmap(void* addr, size_t len, int prot,