# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//third_party/protobuf/proto_library.gni")
source_set("browser") {
sources = [
"browser/leveldb_persistence_provider.cc",
"browser/leveldb_persistence_provider.h",
"browser/origin_trials.cc",
"browser/origin_trials.h",
]
deps = [
":common",
":db_trial_token",
":proto",
"//base",
"//components/leveldb_proto",
"//components/prefs",
"//components/user_prefs",
"//content/public/browser",
"//net",
"//third_party/blink/public/common:headers",
"//url:url",
]
}
source_set("common") {
sources = [
"common/features.cc",
"common/features.h",
"common/origin_trials_persistence_provider.h",
"common/persisted_trial_token.cc",
"common/persisted_trial_token.h",
]
deps = [
"//base",
"//content/public/common",
"//third_party/blink/public/common:headers",
"//url:url",
]
}
proto_library("db_trial_token") {
visibility = [ "//components/origin_trials:*" ]
sources = [ "proto/db_trial_token.proto" ]
}
source_set("proto") {
visibility = [ "//components/origin_trials:*" ]
sources = [
"proto/proto_util.cc",
"proto/proto_util.h",
]
deps = [
":common",
":db_trial_token",
"//base",
"//url:url",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"browser/leveldb_persistence_provider_unittest.cc",
"browser/origin_trials_unittest.cc",
"common/persisted_trial_token_unittest.cc",
]
deps = [
":browser",
":common",
":db_trial_token",
":proto",
"./test",
"//base",
"//base/test:test_support",
"//components/leveldb_proto:test_support",
"//components/sync_preferences:test_support",
"//components/user_prefs:user_prefs",
"//content/public/browser",
"//content/public/common",
"//content/test:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/blink/public:test_headers",
"//url:url",
]
}