naiveproxy/components/rappor/BUILD.gn
2018-08-14 22:19:20 +00:00

125 lines
2.5 KiB
Plaintext

# Copyright 2014 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("//testing/test.gni")
static_library("rappor") {
sources = [
"bloom_filter.cc",
"bloom_filter.h",
"byte_vector_utils.cc",
"byte_vector_utils.h",
"log_uploader.cc",
"log_uploader.h",
"log_uploader_interface.h",
"rappor_metric.cc",
"rappor_metric.h",
"rappor_parameters.cc",
"rappor_pref_names.cc",
"rappor_pref_names.h",
"rappor_prefs.cc",
"rappor_prefs.h",
"rappor_service_impl.cc",
"rappor_service_impl.h",
"rappor_utils.cc",
"reports.cc",
"reports.h",
"sample.cc",
"sampler.cc",
"sampler.h",
]
public_deps = [
"//components/rappor/proto",
"//components/rappor/public",
]
deps = [
"//base",
"//components/data_use_measurement/core",
"//components/metrics",
"//components/prefs",
"//components/variations",
"//crypto",
"//net",
"//services/network/public/cpp:cpp",
"//third_party/smhasher:cityhash",
]
}
static_library("rappor_recorder") {
sources = [
"rappor_recorder_impl.cc",
"rappor_recorder_impl.h",
]
public_deps = [
"//base",
"//components/rappor/public/interfaces",
]
deps = [
":rappor",
"//mojo/public/cpp/bindings",
]
}
static_library("test_support") {
testonly = true
sources = [
"test_log_uploader.cc",
"test_log_uploader.h",
"test_rappor_service.cc",
"test_rappor_service.h",
]
public_deps = [
":rappor",
]
deps = [
"//base",
"//components/prefs:test_support",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"bloom_filter_unittest.cc",
"byte_vector_utils_unittest.cc",
"log_uploader_unittest.cc",
"rappor_metric_unittest.cc",
"rappor_prefs_unittest.cc",
"rappor_service_unittest.cc",
"rappor_utils_unittest.cc",
"reports_unittest.cc",
"sampler_unittest.cc",
]
deps = [
":rappor",
":test_support",
"//base",
"//base/test:test_support",
"//components/metrics",
"//components/prefs:test_support",
"//net:test_support",
"//services/network:test_support",
"//services/network/public/cpp:cpp",
"//testing/gtest",
"//url",
]
}
# Convenience testing target
test("rappor_unittests") {
sources = [
"//components/test/run_all_unittests.cc",
]
deps = [
":unit_tests",
"//components/test:test_support",
]
}