blob: cb7a79fe16165c00d759f599127bd981c6bb0b35 [file] [log] [blame]
# Copyright 2015 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("//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
}
fieldtrial_testing_enabled =
!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 = [
"safe_seed_manager.cc",
"safe_seed_manager.h",
"ui_string_overrider.cc",
"ui_string_overrider.h",
"variations_field_trial_creator.cc",
"variations_field_trial_creator.h",
"variations_service.cc",
"variations_service.h",
"variations_service_client.cc",
"variations_service_client.h",
]
deps = [
":buildflags",
":constants",
"//base",
"//build:branding_buildflags",
"//build:chromeos_buildflags",
"//components/encrypted_messages",
"//components/language/core/browser",
"//components/metrics",
"//components/network_time",
"//components/pref_registry",
"//components/prefs",
"//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 = [
"safe_seed_manager_unittest.cc",
"ui_string_overrider_unittest.cc",
"variations_field_trial_creator_unittest.cc",
"variations_service_unittest.cc",
]
deps = [
":buildflags",
":constants",
":service",
"//base",
"//base/test:test_support",
"//build:branding_buildflags",
"//components/metrics",
"//components/metrics:test_support",
"//components/prefs: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",
]
}
static_library("constants") {
sources = [
"variations_safe_mode_constants.cc",
"variations_safe_mode_constants.h",
]
deps = [ "//base" ]
}