summaryrefslogtreecommitdiff
path: root/chromium/components/safe_browsing/common/BUILD.gn
blob: 0d963a838207d8bf7fe746451c52bd84d2327241 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copyright 2016 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("//chrome/common/features.gni")
import("//mojo/public/tools/bindings/mojom.gni")

source_set("common") {
  sources = [
    "safebrowsing_constants.cc",
    "safebrowsing_constants.h",
    "safebrowsing_switches.cc",
    "safebrowsing_switches.h",
    "utils.cc",
    "utils.h",
  ]

  deps = [
    "//base",
    "//crypto:crypto",
    "//ipc",
    "//url/ipc:url_ipc",
  ]

  public_deps = [
    ":interfaces",
  ]
}

static_library("safe_browsing_prefs") {
  sources = [
    "safe_browsing_prefs.cc",
    "safe_browsing_prefs.h",
  ]

  deps = [
    "//base:base",
    "//components/pref_registry:pref_registry",
    "//components/prefs",
    "//components/safe_browsing:features",
    "//content/public/browser:browser",
    "//net:net",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "safe_browsing_prefs_unittest.cc",
  ]
  deps = [
    ":safe_browsing_prefs",
    "//base:base",
    "//base/test:test_support",
    "//components/prefs:test_support",
    "//components/safe_browsing:features",
    "//content/test:test_support",
    "//testing/gtest",
    "//url:url",
  ]
}

mojom("interfaces") {
  sources = [
    "safe_browsing.mojom",
  ]

  public_deps = [
    "//content/public/common:resource_type_bindings",
    "//services/network/public/mojom",
    "//url/mojom:url_mojom_gurl",
  ]

  enabled_features = []
  if (safe_browsing_mode == 1) {
    enabled_features += [ "full_safe_browsing" ]
  }
}