Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / components / variations / BUILD.gn
blobc0e4b45687a85feb0237e3b280f2e6666e77e9ce
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
3 # found in the LICENSE file.
5 if (is_android) {
6   import("//build/config/android/rules.gni")
9 source_set("variations") {
10   sources = [
11     "active_field_trials.cc",
12     "active_field_trials.h",
13     "android/component_jni_registrar.cc",
14     "android/component_jni_registrar.h",
15     "android/variations_associated_data_android.cc",
16     "android/variations_associated_data_android.h",
17     "caching_permuted_entropy_provider.cc",
18     "caching_permuted_entropy_provider.h",
19     "entropy_provider.cc",
20     "entropy_provider.h",
21     "experiment_labels.cc",
22     "experiment_labels.h",
23     "metrics_util.cc",
24     "metrics_util.h",
25     "pref_names.cc",
26     "pref_names.h",
27     "processed_study.cc",
28     "processed_study.h",
29     "proto/client_variations.proto",
30     "proto/permuted_entropy_cache.proto",
31     "proto/study.proto",
32     "proto/variations_seed.proto",
33     "study_filtering.cc",
34     "study_filtering.h",
35     "variations_associated_data.cc",
36     "variations_associated_data.h",
37     "variations_experiment_util.cc",
38     "variations_experiment_util.h",
39     "variations_request_scheduler.cc",
40     "variations_request_scheduler.h",
41     "variations_seed_processor.cc",
42     "variations_seed_processor.h",
43     "variations_seed_simulator.cc",
44     "variations_seed_simulator.h",
45     "variations_seed_store.cc",
46     "variations_seed_store.h",
47     "variations_switches.cc",
48     "variations_switches.h",
49     "variations_url_constants.cc",
50     "variations_url_constants.h",
51     "variations_util.cc",
52     "variations_util.h",
53   ]
55   if (is_android || is_ios) {
56     sources += [
57       "variations_request_scheduler_mobile.cc",
58       "variations_request_scheduler_mobile.h",
59     ]
60   }
62   deps = [
63     "proto",
64     "//base",
65     "//base:prefs",
66     "//components/compression",
67     "//components/crash_keys",
68     "//crypto",
69     "//third_party/mt19937ar",
70     "//third_party/protobuf:protobuf_lite",
71   ]
73   if (is_android) {
74     deps += [ ":jni" ]
75   }
78 if (is_android) {
79   # GYP: //components/variations.gypi:variations_jni_headers
80   generate_jni("jni") {
81     sources = [
82       "android/java/src/org/chromium/components/variations/VariationsAssociatedData.java",
83     ]
84     jni_package = "variations"
85   }
88 source_set("unit_tests") {
89   testonly = true
90   sources = [
91     "active_field_trials_unittest.cc",
92     "caching_permuted_entropy_provider_unittest.cc",
93     "entropy_provider_unittest.cc",
94     "experiment_labels_unittest.cc",
95     "metrics_util_unittest.cc",
96     "net/variations_http_header_provider_unittest.cc",
97     "study_filtering_unittest.cc",
98     "variations_associated_data_unittest.cc",
99     "variations_request_scheduler_unittest.cc",
100     "variations_seed_processor_unittest.cc",
101     "variations_seed_simulator_unittest.cc",
102     "variations_seed_store_unittest.cc",
103   ]
105   if (is_android || is_ios) {
106     sources += [ "variations_request_scheduler_mobile_unittest.cc" ]
107   }
109   deps = [
110     ":variations",
111     "net",
112     "proto",
113     "//base:prefs_test_support",
114     "//base/test:test_support",
115     "//components/compression",
116     "//testing/gtest",
117   ]