blob: 68719e2bf2004c757ba5c5e9328d0d55b26ce833 [file] [log] [blame]
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
# TODO(crbug.com/1129544) This is currently disabled due to Windows DLL
# thunking issues. Fix & re-enable.
assert(is_linux || is_chromeos_ash || is_chromeos_lacros)
source_set("constants") {
sources = [
"constants.cc",
"constants.h",
]
deps = [ "//build:chromeos_buildflags" ]
}
static_library("error_reporting") {
sources = [
"chrome_js_error_report_processor.cc",
"chrome_js_error_report_processor.h",
]
deps = [
"//base",
"//build:branding_buildflags",
"//build:chromeos_buildflags",
"//chrome/common:constants",
"//components/crash/content/browser/error_reporting",
"//components/crash/core/app",
"//components/feedback",
"//components/startup_metric_utils/browser",
"//components/upload_list",
"//components/variations",
"//content/public/browser",
"//net",
"//services/network:network_service",
"//services/network/public/cpp",
]
if (is_chromeos_ash || is_chromeos_lacros) {
sources += [ "chrome_js_error_report_processor_chromeos.cc" ]
deps += [ ":constants" ]
} else {
sources += [ "chrome_js_error_report_processor_nonchromeos.cc" ]
}
}
source_set("test_support") {
testonly = true
sources = [
"mock_chrome_js_error_report_processor.cc",
"mock_chrome_js_error_report_processor.h",
]
deps = [
":error_reporting",
"//base",
"//base/test:test_support",
"//build:chromeos_buildflags",
"//chrome/common:constants",
"//components/crash/content/browser/error_reporting",
"//components/crash/content/browser/error_reporting:mock_crash_endpoint",
"//components/variations",
]
if (is_chromeos_ash || is_chromeos_lacros) {
data_deps = [ ":mock_chromeos_crash_reporter" ]
}
}
source_set("unit_test") {
testonly = true
sources = [ "chrome_js_error_report_processor_unittest.cc" ]
deps = [
":error_reporting",
":test_support",
"//base",
"//chrome/test:test_support",
"//components/crash/content/browser/error_reporting",
"//components/crash/content/browser/error_reporting:mock_crash_endpoint",
"//components/crash/core/app",
"//components/upload_list",
"//content/test:test_support",
"//net:test_support",
"//testing/gtest",
]
}
if (is_chromeos_ash || is_chromeos_lacros) {
executable("mock_chromeos_crash_reporter") {
testonly = true
sources = [ "mock_chromeos_crash_reporter.cc" ]
deps = [
":constants",
"//base",
"//net",
"//third_party/crashpad/crashpad/third_party/cpp-httplib",
]
}
}