Commit 63a7b4f7 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Clean up deprecated sources assignment filter in //components/crash

Remove deprecated_default_sources_assignment_filter and replace
it with explicit is_win, is_mac, etc. sections.

Bug: 1018739
Change-Id: Id57a75e0a359be08f4a14a11d8d71419705220b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446050
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813719}
parent b55f2573
......@@ -6,27 +6,11 @@ if (is_android) {
import("//build/config/android/config.gni")
}
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
# TODO(crbug.com/753619): Enable crash reporting on Fuchsia.
assert(!is_fuchsia)
source_set("browser") {
sources = [
"child_exit_observer_android.cc",
"child_exit_observer_android.h",
"child_process_crash_observer_android.cc",
"child_process_crash_observer_android.h",
"crash_memory_metrics_collector_android.cc",
"crash_memory_metrics_collector_android.h",
"crash_metrics_reporter_android.cc",
"crash_metrics_reporter_android.h",
]
sources = []
deps = [
"//base",
......@@ -36,8 +20,6 @@ source_set("browser") {
]
if (is_linux || is_chromeos || is_android) {
set_sources_assignment_filter([])
# Want this file on both Linux and Android.
sources += [
"crash_handler_host_linux.cc",
......@@ -49,10 +31,6 @@ source_set("browser") {
deps += [ "//third_party/crashpad/crashpad/client" ]
}
if (!is_android) {
deps += [ "//third_party/breakpad:client" ]
}
# This is not in the GYP build but this target includes breakpad client
# headers, so add the dependency here.
if ((is_posix && !is_ios) || is_fuchsia) {
......@@ -61,16 +39,31 @@ source_set("browser") {
}
if (is_android) {
sources += [
"child_exit_observer_android.cc",
"child_exit_observer_android.h",
"child_process_crash_observer_android.cc",
"child_process_crash_observer_android.h",
"crash_memory_metrics_collector_android.cc",
"crash_memory_metrics_collector_android.h",
"crash_metrics_reporter_android.cc",
"crash_metrics_reporter_android.h",
]
deps += [
"//components/crash/android:jni_headers",
"//mojo/public/cpp/bindings",
]
} else {
deps += [ "//third_party/breakpad:client" ]
}
}
source_set("unit_tests") {
testonly = true
sources = [ "crash_metrics_reporter_android_unittest.cc" ]
sources = []
if (is_android) {
sources += [ "crash_metrics_reporter_android_unittest.cc" ]
}
deps = [
":browser",
"//base/test:test_support",
......
......@@ -11,13 +11,6 @@ if (is_android) {
import("//build/config/android/config.gni")
}
# This file depends on the legacy global sources assignment filter. It should
# be converted to check target platform before assigning source files to the
# sources variable. Remove this import and set_sources_assignment_filter call
# when the file has been converted. See https://crbug.com/1018739 for details.
import("//build/config/deprecated_default_sources_assignment_filter.gni")
set_sources_assignment_filter(deprecated_default_sources_assignment_filter)
source_set("lib") {
visibility = [
":*",
......@@ -56,10 +49,6 @@ static_library("app") {
"crash_switches.cc",
"crash_switches.h",
"crashpad.h",
"crashpad_android.cc",
"crashpad_linux.cc",
"crashpad_mac.mm",
"crashpad_win.cc",
]
if (is_mac || is_win || is_android || is_linux || is_chromeos) {
......@@ -71,6 +60,7 @@ static_library("app") {
"breakpad_linux.cc",
"breakpad_linux.h",
"breakpad_linux_impl.h",
"crashpad_linux.cc",
]
}
......@@ -91,12 +81,14 @@ static_library("app") {
}
if (is_android) {
sources += [ "crashpad_android.cc" ]
deps += [
":crashpad_handler_main",
"//components/crash/android:jni_headers",
"//third_party/crashpad/crashpad/handler",
"//third_party/crashpad/crashpad/snapshot",
]
libs = [ "log" ]
}
if (is_android || is_linux || is_chromeos) {
......@@ -113,6 +105,7 @@ static_library("app") {
if (is_win) {
sources += [
"crashpad_win.cc",
"dump_hung_process_with_ptype.cc",
"dump_hung_process_with_ptype.h",
"minidump_with_crashpad_info.cc",
......@@ -128,16 +121,13 @@ static_library("app") {
}
if (is_mac) {
sources += [ "crashpad_mac.mm" ]
deps += [
"//third_party/crashpad/crashpad/minidump",
"//third_party/crashpad/crashpad/snapshot",
]
}
if (is_android) {
libs = [ "log" ]
}
if (is_linux || is_chromeos) {
data_deps = [ "//third_party/crashpad/crashpad/handler:crashpad_handler" ]
}
......@@ -284,11 +274,7 @@ source_set("test_support") {
source_set("unit_tests") {
testonly = true
sources = [
"fallback_crash_handler_launcher_win_unittest.cc",
"fallback_crash_handler_win_unittest.cc",
"fallback_crash_handling_win_unittest.cc",
]
sources = []
deps = [
":lib",
"//base",
......@@ -298,6 +284,11 @@ source_set("unit_tests") {
]
if (is_win) {
sources += [
"fallback_crash_handler_launcher_win_unittest.cc",
"fallback_crash_handler_win_unittest.cc",
"fallback_crash_handling_win_unittest.cc",
]
deps += [
":run_as_crashpad_handler",
"//third_party/breakpad:client",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment