File: BUILD.gn

package info (click to toggle)
chromium 140.0.7339.185-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,193,740 kB
  • sloc: cpp: 35,093,945; ansic: 7,161,670; javascript: 4,199,694; python: 1,441,797; asm: 949,904; xml: 747,515; pascal: 187,748; perl: 88,691; sh: 88,248; objc: 79,953; sql: 52,714; cs: 44,599; fortran: 24,137; makefile: 22,114; tcl: 15,277; php: 13,980; yacc: 9,000; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (130 lines) | stat: -rw-r--r-- 4,313 bytes parent folder | download | duplicates (5)
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chrome/browser/buildflags.gni")

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

  android_library("java") {
    sources = [
      "java/src/org/chromium/chrome/browser/user_education/IphCommand.java",
      "java/src/org/chromium/chrome/browser/user_education/IphCommandBuilder.java",
      "java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java",
    ]

    deps = [
      ":java_resources",
      "//base:base_java",
      "//chrome/browser/feature_engagement:java",
      "//chrome/browser/flags:java",
      "//chrome/browser/profiles/android:java",
      "//chrome/browser/util:java",
      "//components/browser_ui/util/android:java",
      "//components/browser_ui/widget/android:java",
      "//components/feature_engagement/public:public_java",
      "//third_party/androidx:androidx_annotation_annotation_java",
      "//third_party/androidx:androidx_core_core_java",
      "//ui/android:ui_full_java",
    ]
    resources_package = "org.chromium.chrome.browser.user_education"
  }

  android_resources("java_resources") {
    sources = [ "java/res/values/dimens.xml" ]
  }

  robolectric_library("junit") {
    sources = [
      "java/src/org/chromium/chrome/browser/user_education/IphCommandBuilderUnitTest.java",
      "java/src/org/chromium/chrome/browser/user_education/IphCommandUnitTest.java",
      "java/src/org/chromium/chrome/browser/user_education/UserEducationHelperUnitTest.java",
    ]
    deps = [
      ":java",
      ":java_resources",
      "//base:base_java",
      "//base:base_junit_test_support",
      "//chrome/browser/feature_engagement:java",
      "//chrome/browser/profiles/android:java",
      "//components/browser_ui/theme/android:java_resources",
      "//components/browser_ui/widget/android:java",
      "//components/feature_engagement/public:public_java",
      "//third_party/androidx:androidx_appcompat_appcompat_java",
      "//third_party/androidx:androidx_test_core_java",
      "//third_party/androidx:androidx_test_ext_junit_java",
      "//third_party/junit",
      "//third_party/mockito:mockito_java",
      "//ui/android:ui_java_test_support",
    ]
    resources_package = "org.chromium.chrome.browser.user_education.test"
  }
} else {  # !is_android
  source_set("user_education") {
    sources = [
      "browser_tutorial_service.cc",
      "browser_tutorial_service.h",
      "browser_user_education_storage_service.cc",
      "browser_user_education_storage_service.h",
      "ntp_promo_identifiers.h",
      "recent_session_observer.cc",
      "recent_session_observer.h",
      "recent_session_tracker.cc",
      "recent_session_tracker.h",
      "tutorial_identifiers.h",
      "user_education_configuration_provider.cc",
      "user_education_configuration_provider.h",
      "user_education_service.cc",
      "user_education_service.h",
      "user_education_service_factory.cc",
      "user_education_service_factory.h",
    ]

    public_deps = [
      "//chrome/browser/feature_engagement",
      "//chrome/browser/profiles",
      "//components/feature_engagement/public",
      "//components/user_education/common",
    ]

    deps = [
      "//base",
      "//chrome/app:generated_resources",
      "//chrome/browser/headless",
      "//chrome/browser/ui/views/user_education",
      "//chrome/common:non_code_constants",
      "//components/keyed_service/content",
      "//components/prefs",
      "//content/public/browser",
      "//ui/base",
    ]

    if (is_chromeos) {
      deps += [ "//chromeos/components/mgs" ]
    }
  }

  source_set("unit_tests") {
    testonly = true

    sources = [
      "browser_user_education_storage_service_unittest.cc",
      "recent_session_tracker_unittest.cc",
      "user_education_configuration_provider_unittest.cc",
    ]

    deps = [
      ":user_education",
      "//chrome/app:command_ids",
      "//chrome/test:test_support",
      "//components/prefs",
      "//components/strings:components_strings_grit",
      "//components/user_education/test",
      "//content/test:test_support",
      "//testing/gmock",
      "//testing/gtest",
    ]
  }
}