123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- # Copyright 2019 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/chromecast_build.gni")
- if (is_android) {
- import("//build/config/android/rules.gni")
- }
- static_library("quarantine") {
- sources = [
- "quarantine.cc",
- "quarantine.h",
- "quarantine_impl.cc",
- "quarantine_impl.h",
- ]
- public_deps = [ "//components/services/quarantine/public/mojom" ]
- deps = [
- ":common",
- "//base",
- "//net",
- "//url",
- ]
- if (is_win) {
- sources += [ "quarantine_win.cc" ]
- }
- if (is_mac) {
- sources += [ "quarantine_mac.mm" ]
- frameworks = [
- "Carbon.framework",
- "Foundation.framework",
- ]
- }
- if (is_chromeos) {
- sources += [ "quarantine_chromeos.cc" ]
- deps += [
- "//chromeos/dbus/dlp",
- "//chromeos/dbus/dlp:dlp_proto",
- ]
- }
- }
- source_set("common") {
- sources = [
- "common.cc",
- "common.h",
- ]
- deps = [
- "//base",
- "//url",
- ]
- if (is_win) {
- sources += [
- "common_win.cc",
- "common_win.h",
- ]
- }
- if (is_mac) {
- sources += [
- "common_mac.h",
- "common_mac.mm",
- ]
- frameworks = [
- "Carbon.framework",
- "Foundation.framework",
- ]
- }
- }
- source_set("test_support") {
- testonly = true
- sources = [
- "test_support.cc",
- "test_support.h",
- ]
- deps = [
- ":common",
- ":quarantine",
- "//base",
- "//url",
- ]
- if (is_win) {
- sources += [ "test_support_win.cc" ]
- }
- if (is_mac) {
- sources += [ "test_support_mac.mm" ]
- frameworks = [
- "Carbon.framework",
- "Foundation.framework",
- ]
- }
- }
- source_set("unit_tests") {
- testonly = true
- sources = [
- "common_unittests.cc",
- "quarantine_service_unittest.cc",
- ]
- # Chromecasts do not have extended attributes enabled; even if it were
- # enabled, the devices use tmpfs which restricts the extended attributes that
- # can be set such that quarantining still would not work. (The platform
- # specific tests include a runtime guard to skip tests that need xattr.)
- if (!is_castos && !is_cast_android) {
- sources += [ "quarantine_unittest.cc" ]
- }
- deps = [
- ":common",
- ":quarantine",
- ":test_support",
- "//base",
- "//base/test:test_support",
- "//components/services/quarantine/public/mojom",
- "//net",
- "//testing/gmock",
- "//testing/gtest",
- "//url",
- ]
- if (is_win) {
- sources += [ "quarantine_win_unittest.cc" ]
- }
- if (is_mac) {
- sources += [ "quarantine_mac_unittest.mm" ]
- frameworks = [
- "Carbon.framework",
- "Foundation.framework",
- ]
- }
- }
|