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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
# Copyright 2017 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/config.gni")
import("//build/config/android/rules.gni")
import("//third_party/jni_zero/jni_zero.gni")
}
static_library("internal") {
visibility = [
":*",
"//components/feature_engagement",
"//components/feature_engagement/internal/test:test_support",
"//components/feature_engagement/test:test_support",
]
sources = [
"availability_model.h",
"availability_model_impl.cc",
"availability_model_impl.h",
"blocked_iph_features.cc",
"blocked_iph_features.h",
"chrome_variations_configuration.cc",
"chrome_variations_configuration.h",
"condition_validator.cc",
"condition_validator.h",
"display_lock_controller.h",
"display_lock_controller_impl.cc",
"display_lock_controller_impl.h",
"editable_configuration.cc",
"editable_configuration.h",
"event_model.h",
"event_model_impl.cc",
"event_model_impl.h",
"event_model_provider.h",
"event_model_reader.h",
"event_model_writer.h",
"event_storage_migration.cc",
"event_storage_migration.h",
"event_storage_validator.h",
"event_store.h",
"feature_config_condition_validator.cc",
"feature_config_condition_validator.h",
"feature_config_event_storage_validator.cc",
"feature_config_event_storage_validator.h",
"in_memory_event_store.cc",
"in_memory_event_store.h",
"init_aware_event_model.cc",
"init_aware_event_model.h",
"multiple_event_model_provider.cc",
"multiple_event_model_provider.h",
"multiple_event_model_writer.cc",
"multiple_event_model_writer.h",
"never_availability_model.cc",
"never_availability_model.h",
"never_condition_validator.cc",
"never_condition_validator.h",
"never_event_storage_validator.cc",
"never_event_storage_validator.h",
"noop_display_lock_controller.cc",
"noop_display_lock_controller.h",
"once_condition_validator.cc",
"once_condition_validator.h",
"persistent_availability_store.cc",
"persistent_availability_store.h",
"persistent_event_store.cc",
"persistent_event_store.h",
"single_event_model_provider.cc",
"single_event_model_provider.h",
"single_invalid_configuration.cc",
"single_invalid_configuration.h",
"stats.cc",
"stats.h",
"system_time_provider.cc",
"system_time_provider.h",
"testing_clock_time_provider.cc",
"testing_clock_time_provider.h",
"time_provider.h",
"tracker_impl.cc",
"tracker_impl.h",
]
public_deps = [
"//base",
"//components/feature_engagement/internal/proto",
"//components/prefs",
]
deps = [
"//components/feature_engagement/public",
"//components/feature_engagement/public:prefs",
"//components/keyed_service/core",
"//components/leveldb_proto",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
if (is_android) {
sources += [
"android/tracker_impl_android.cc",
"android/tracker_impl_android.h",
]
deps += [ ":jni_headers" ]
}
}
source_set("unit_tests") {
testonly = true
visibility = [ "//components/feature_engagement:unit_tests" ]
# IMPORTANT NOTE: When adding new tests, also remember to update the list of
# tests in //components/feature_engagement/components_unittests.filter
sources = [
"availability_model_impl_unittest.cc",
"blocked_iph_features_unittest.cc",
"chrome_variations_configuration_unittest.cc",
"condition_validator_unittest.cc",
"display_lock_controller_impl_unittest.cc",
"editable_configuration_unittest.cc",
"event_model_impl_unittest.cc",
"event_storage_migration_unittest.cc",
"feature_config_condition_validator_unittest.cc",
"feature_config_event_storage_validator_unittest.cc",
"in_memory_event_store_unittest.cc",
"init_aware_event_model_unittest.cc",
"multiple_event_model_provider_unittest.cc",
"multiple_event_model_writer_unittest.cc",
"never_availability_model_unittest.cc",
"never_condition_validator_unittest.cc",
"never_event_storage_validator_unittest.cc",
"noop_display_lock_controller_unittest.cc",
"once_condition_validator_unittest.cc",
"persistent_availability_store_unittest.cc",
"persistent_event_store_unittest.cc",
"single_event_model_provider_unittest.cc",
"single_invalid_configuration_unittest.cc",
"system_time_provider_unittest.cc",
"tracker_impl_unittest.cc",
]
deps = [
":internal",
"//base/test:test_support",
"//components/feature_engagement/internal/test:test_support",
"//components/feature_engagement/public",
"//components/feature_engagement/public:prefs",
"//components/feature_engagement/test:test_support",
"//components/leveldb_proto:test_support",
"//components/prefs",
"//components/prefs:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
if (is_android) {
android_library("internal_java") {
visibility = [ "//components/feature_engagement:feature_engagement_java" ]
srcjar_deps = [ ":jni_headers" ]
sources = [ "android/java/src/org/chromium/components/feature_engagement/internal/TrackerImpl.java" ]
deps = [
"//base:base_java",
"//build/android:build_java",
"//components/feature_engagement/public:public_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/android:ui_java",
]
}
generate_jni("jni_headers") {
visibility = [ ":*" ]
sources = [ "android/java/src/org/chromium/components/feature_engagement/internal/TrackerImpl.java" ]
}
}
|