summaryrefslogtreecommitdiff
path: root/chromium/components/download/quarantine/BUILD.gn
blob: 2c4014c5e60769a0d8858e8bf21e697b81d20fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 2018 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_constants_linux.h",
    "quarantine_linux.cc",
    "quarantine_mac.mm",
    "quarantine_win.cc",
  ]

  deps = [
    "//base",
    "//net",
    "//url",
  ]

  if (is_mac) {
    libs = [
      "Carbon.framework",
      "Foundation.framework",
    ]
  }
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "quarantine_linux_unittest.cc",
    "quarantine_mac_unittest.mm",
    "quarantine_win_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_chromecast) {
    sources += [ "quarantine_unittest.cc" ]
  }

  deps = [
    ":quarantine",
    "//base",
    "//base/test:test_support",
    "//net",
    "//testing/gtest",
    "//url",
  ]
}