1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//build/config/chrome_build.gni")
declare_args() {
# Set to true make a build that disables activation of field trial tests
# specified in testing/variations/fieldtrial_testing_config.json.
# Note: For Chrome-branded Android builds, this is always considered as set to
# true (see below). This is done to avoid the binary size impact (~40 KiB) on
# Android.
disable_fieldtrial_testing_config = false
# Set to true to make a build that force enables activation of field trial
# tests specified in testing/variations/fieldtrial_testing_config.json.
force_enable_fieldtrial_testing_config = false
}
assert(!(disable_fieldtrial_testing_config &&
force_enable_fieldtrial_testing_config),
"Cannot enable and disable field trial testing at the same time.")
fieldtrial_testing_enabled =
force_enable_fieldtrial_testing_config ||
(!disable_fieldtrial_testing_config && !(is_android && is_chrome_branded))
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "FIELDTRIAL_TESTING_ENABLED=$fieldtrial_testing_enabled" ]
}
static_library("service") {
sources = [
"google_groups_manager.cc",
"google_groups_manager.h",
"google_groups_manager_prefs.h",
"limited_entropy_randomization.cc",
"limited_entropy_randomization.h",
"safe_seed_manager.cc",
"safe_seed_manager.h",
"safe_seed_manager_base.cc",
"safe_seed_manager_base.h",
"ui_string_overrider.cc",
"ui_string_overrider.h",
"variations_field_trial_creator.cc",
"variations_field_trial_creator.h",
"variations_field_trial_creator_base.cc",
"variations_field_trial_creator_base.h",
"variations_service.cc",
"variations_service.h",
"variations_service_client.cc",
"variations_service_client.h",
"variations_service_utils.cc",
"variations_service_utils.h",
]
public_deps = [ "//base" ]
deps = [
":buildflags",
"//build:branding_buildflags",
"//build/config/chromebox_for_meetings:buildflags",
"//components/country_codes",
"//components/encrypted_messages",
"//components/keyed_service/core",
"//components/language/core/browser",
"//components/metrics",
"//components/network_time",
"//components/pref_registry",
"//components/prefs",
"//components/sync/service",
"//components/variations",
"//components/variations/field_trial_config",
"//components/variations/proto",
"//components/version_info",
"//components/web_resource",
"//net",
"//services/network/public/cpp",
"//ui/base",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"google_groups_manager_unittest.cc",
"limited_entropy_randomization_unittest.cc",
"safe_seed_manager_unittest.cc",
"ui_string_overrider_unittest.cc",
"variations_field_trial_creator_unittest.cc",
"variations_service_unittest.cc",
"variations_service_utils_unittest.cc",
]
deps = [
":buildflags",
":service",
"//base",
"//base/test:test_support",
"//build:branding_buildflags",
"//components/metrics",
"//components/metrics:test_support",
"//components/prefs:test_support",
"//components/sync:test_support",
"//components/sync_preferences:test_support",
"//components/variations",
"//components/variations:test_support",
"//components/variations/field_trial_config",
"//components/variations/proto",
"//components/version_info",
"//components/web_resource:test_support",
"//net",
"//net:test_support",
"//services/network:test_support",
"//services/network/public/cpp",
"//testing/gtest",
]
}
|