| # 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. |
| |
| if (is_android) { |
| import("//build/config/android/rules.gni") |
| } |
| |
| source_set("variations") { |
| sources = [ |
| "active_field_trials.cc", |
| "active_field_trials.h", |
| "android/component_jni_registrar.cc", |
| "android/component_jni_registrar.h", |
| "android/variations_associated_data_android.cc", |
| "android/variations_associated_data_android.h", |
| "caching_permuted_entropy_provider.cc", |
| "caching_permuted_entropy_provider.h", |
| "entropy_provider.cc", |
| "entropy_provider.h", |
| "metrics_util.cc", |
| "metrics_util.h", |
| "pref_names.cc", |
| "pref_names.h", |
| "processed_study.cc", |
| "processed_study.h", |
| "proto/client_variations.proto", |
| "proto/permuted_entropy_cache.proto", |
| "proto/study.proto", |
| "proto/variations_seed.proto", |
| "study_filtering.cc", |
| "study_filtering.h", |
| "variations_associated_data.cc", |
| "variations_associated_data.h", |
| "variations_seed_processor.cc", |
| "variations_seed_processor.h", |
| "variations_seed_simulator.cc", |
| "variations_seed_simulator.h", |
| ] |
| |
| deps = [ |
| "proto", |
| "//base", |
| "//third_party/mt19937ar", |
| ] |
| |
| if (is_android) { |
| deps += [ ":jni" ] |
| } |
| } |
| |
| if (is_android) { |
| # GYP: //components/variations.gypi:variations_jni_headers |
| generate_jni("jni") { |
| sources = [ |
| "android/java/src/org/chromium/components/variations/VariationsAssociatedData.java", |
| ] |
| jni_package = "variations" |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "active_field_trials_unittest.cc", |
| "caching_permuted_entropy_provider_unittest.cc", |
| "entropy_provider_unittest.cc", |
| "metrics_util_unittest.cc", |
| "net/variations_http_header_provider_unittest.cc", |
| "study_filtering_unittest.cc", |
| "variations_associated_data_unittest.cc", |
| "variations_seed_processor_unittest.cc", |
| "variations_seed_simulator_unittest.cc", |
| ] |
| |
| deps = [ |
| ":variations", |
| "net", |
| "proto", |
| "//base/test:test_support", |
| "//testing/gtest", |
| ] |
| } |