OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 if (is_android) { | 5 if (is_android) { |
6 import("//build/config/android/rules.gni") | 6 import("//build/config/android/rules.gni") |
7 } | 7 } |
8 | 8 |
9 static_library("variations") { | 9 source_set("variations") { |
10 sources = [ | 10 sources = [ |
11 "active_field_trials.cc", | 11 "active_field_trials.cc", |
12 "active_field_trials.h", | 12 "active_field_trials.h", |
13 "android/component_jni_registrar.cc", | 13 "android/component_jni_registrar.cc", |
14 "android/component_jni_registrar.h", | 14 "android/component_jni_registrar.h", |
15 "android/variations_associated_data_android.cc", | 15 "android/variations_associated_data_android.cc", |
16 "android/variations_associated_data_android.h", | 16 "android/variations_associated_data_android.h", |
17 "caching_permuted_entropy_provider.cc", | 17 "caching_permuted_entropy_provider.cc", |
18 "caching_permuted_entropy_provider.h", | 18 "caching_permuted_entropy_provider.h", |
19 "entropy_provider.cc", | 19 "entropy_provider.cc", |
20 "entropy_provider.h", | 20 "entropy_provider.h", |
21 "metrics_util.cc", | 21 "metrics_util.cc", |
22 "metrics_util.h", | 22 "metrics_util.h", |
23 "pref_names.cc", | 23 "pref_names.cc", |
24 "pref_names.h", | 24 "pref_names.h", |
25 "processed_study.cc", | 25 "processed_study.cc", |
26 "processed_study.h", | 26 "processed_study.h", |
27 "proto/client_variations.proto", | 27 "proto/client_variations.proto", |
28 "proto/permuted_entropy_cache.proto", | 28 "proto/permuted_entropy_cache.proto", |
29 "proto/study.proto", | 29 "proto/study.proto", |
30 "proto/variations_seed.proto", | 30 "proto/variations_seed.proto", |
31 "study_filtering.cc", | 31 "study_filtering.cc", |
32 "study_filtering.h", | 32 "study_filtering.h", |
33 "variations_associated_data.cc", | 33 "variations_associated_data.cc", |
34 "variations_associated_data.h", | 34 "variations_associated_data.h", |
35 "variations_http_header_provider.cc", | |
36 "variations_http_header_provider.h", | |
37 "variations_seed_processor.cc", | 35 "variations_seed_processor.cc", |
38 "variations_seed_processor.h", | 36 "variations_seed_processor.h", |
39 "variations_seed_simulator.cc", | 37 "variations_seed_simulator.cc", |
40 "variations_seed_simulator.h", | 38 "variations_seed_simulator.h", |
41 ] | 39 ] |
42 | 40 |
43 deps = [ | 41 deps = [ |
| 42 "proto", |
44 "//base", | 43 "//base", |
45 "//components/variations/proto", | |
46 "//third_party/mt19937ar", | 44 "//third_party/mt19937ar", |
47 ] | 45 ] |
48 | 46 |
49 if (is_android) { | 47 if (is_android) { |
50 deps += [ ":jni" ] | 48 deps += [ ":jni" ] |
51 } | 49 } |
52 } | 50 } |
53 | 51 |
54 if (is_android) { | 52 if (is_android) { |
55 # GYP: //components/variations.gypi:variations_jni_headers | 53 # GYP: //components/variations.gypi:variations_jni_headers |
56 generate_jni("jni") { | 54 generate_jni("jni") { |
57 sources = [ | 55 sources = [ |
58 "android/java/src/org/chromium/components/variations/VariationsAssociatedD
ata.java", | 56 "android/java/src/org/chromium/components/variations/VariationsAssociatedD
ata.java", |
59 ] | 57 ] |
60 jni_package = "variations" | 58 jni_package = "variations" |
61 } | 59 } |
62 } | 60 } |
| 61 |
| 62 source_set("unit_tests") { |
| 63 testonly = true |
| 64 sources = [ |
| 65 "active_field_trials_unittest.cc", |
| 66 "caching_permuted_entropy_provider_unittest.cc", |
| 67 "entropy_provider_unittest.cc", |
| 68 "metrics_util_unittest.cc", |
| 69 "net/variations_http_header_provider_unittest.cc", |
| 70 "study_filtering_unittest.cc", |
| 71 "variations_associated_data_unittest.cc", |
| 72 "variations_seed_processor_unittest.cc", |
| 73 "variations_seed_simulator_unittest.cc", |
| 74 ] |
| 75 |
| 76 deps = [ |
| 77 ":variations", |
| 78 "net", |
| 79 "proto", |
| 80 "//base/test:test_support", |
| 81 "//testing/gtest", |
| 82 ] |
| 83 } |
OLD | NEW |