File: BUILD.gn

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (107 lines) | stat: -rw-r--r-- 3,180 bytes parent folder | download | duplicates (3)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

if (is_android) {
  import("//build/config/android/rules.gni")
  import("//third_party/jni_zero/jni_zero.gni")
}

source_set("sensitive_content") {
  sources = [
    "sensitive_content_client.h",
    "sensitive_content_manager.cc",
    "sensitive_content_manager.h",
  ]
  deps = [
    "//components/password_manager/content/browser:password_form_classification_util",
    "//content/public/browser",
  ]
  public_deps = [
    ":features",
    "//base",
    "//components/autofill/content/browser",
    "//components/autofill/core/browser",
    "//components/autofill/core/common",
  ]
  if (is_android) {
    sources += [
      "android/android_sensitive_content_client.cc",
      "android/android_sensitive_content_client.h",
    ]
    deps += [ ":jni_headers" ]
    public_deps += [ "//ui/android" ]
  }
}

source_set("unit_tests") {
  testonly = true
  sources = [ "sensitive_content_manager_unittest.cc" ]
  deps = [
    ":sensitive_content",
    "//base/test:test_support",
    "//components/autofill/content/browser",
    "//components/autofill/content/browser:test_support",
    "//components/autofill/core/browser",
    "//components/autofill/core/browser:test_support",
    "//components/autofill/core/common",
    "//content/test:test_support",
    "//url",
  ]
}

component("features") {
  output_name = "sensitive_content_features"
  defines = [ "IS_SENSITIVE_CONTENT_FEATURES_IMPL" ]
  sources = [
    "features.cc",
    "features.h",
  ]
  public_deps = [ "//base" ]
}

if (is_android) {
  android_library("java") {
    sources = [ "android/java/src/org/chromium/components/sensitive_content/SensitiveContentClient.java" ]
    deps = [
      "//base:base_java",
      "//content/public/android:content_full_java",
      "//third_party/androidx:androidx_annotation_annotation_java",
      "//third_party/jni_zero:jni_zero_java",
      "//ui/android:ui_no_recycler_view_java",
    ]
    srcjar_deps = [ ":jni_headers" ]
  }

  generate_jni("jni_headers") {
    visibility = [ ":*" ]
    sources = [ "android/java/src/org/chromium/components/sensitive_content/SensitiveContentClient.java" ]
  }

  robolectric_library("junit") {
    sources = [ "android/junit/src/org/chromium/components/sensitive_content/SensitiveContentClientUnitTest.java" ]
    deps = [
      ":java",
      "//base:base_java",
      "//base:base_junit_test_support",
      "//content/public/android:content_full_java",
      "//third_party/android_deps:robolectric_all_java",
      "//third_party/junit",
      "//third_party/mockito:mockito_java",
      "//ui/android:ui_no_recycler_view_java",
    ]
  }

  java_cpp_features("java_features_srcjar") {
    visibility = [ ":*" ]
    sources = [ "//components/sensitive_content/features.cc" ]
    class_name =
        "org.chromium.components.sensitive_content.SensitiveContentFeatures"
  }

  # Used to expose the features to the WebView flag UI (the equivalent of
  # chrome://flags for WebView).
  android_library("sensitive_content_features_java") {
    srcjar_deps = [ ":java_features_srcjar" ]
  }
}