naiveproxy/components/feature_engagement/internal/BUILD.gn

154 lines
4.5 KiB
Plaintext
Raw Permalink Normal View History

2018-08-11 08:35:24 +03:00
# Copyright 2017 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.
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
static_library("internal") {
visibility = [
":*",
"//components/feature_engagement",
"//components/feature_engagement/test:test_support",
]
sources = [
"availability_model.h",
"availability_model_impl.cc",
"availability_model_impl.h",
"chrome_variations_configuration.cc",
"chrome_variations_configuration.h",
"condition_validator.cc",
"condition_validator.h",
"configuration.cc",
"configuration.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_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",
"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_invalid_configuration.cc",
"single_invalid_configuration.h",
"stats.cc",
"stats.h",
"system_time_provider.cc",
"system_time_provider.h",
"time_provider.h",
"tracker_impl.cc",
"tracker_impl.h",
]
public_deps = [
"//components/feature_engagement/internal/proto",
]
deps = [
"//base",
"//components/feature_engagement/public",
"//components/keyed_service/core",
"//components/leveldb_proto",
]
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",
"chrome_variations_configuration_unittest.cc",
"condition_validator_unittest.cc",
"configuration_unittest.cc",
"display_lock_controller_impl_unittest.cc",
"editable_configuration_unittest.cc",
"event_model_impl_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",
"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_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/leveldb_proto:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
if (is_android) {
android_library("internal_java") {
visibility = [ "//components/feature_engagement:feature_engagement_java" ]
java_files = [ "android/java/src/org/chromium/components/feature_engagement/internal/TrackerImpl.java" ]
deps = [
"//base:base_java",
"//components/feature_engagement/public:public_java",
"//third_party/android_tools:android_support_annotations_java",
]
}
generate_jni("jni_headers") {
visibility = [ ":*" ]
sources = [
"android/java/src/org/chromium/components/feature_engagement/internal/TrackerImpl.java",
]
jni_package = "components/feature_engagement/internal"
}
}