blob: de8504e91c42289c51983b7c71b4caa7b888807f [file] [log] [blame]
David Van Cleve10a40f382020-01-11 00:48:431# Copyright 2020 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.
4
5import("//third_party/protobuf/proto_library.gni")
6
7source_set("trust_tokens") {
8 visibility = [
David Van Cleve10a40f382020-01-11 00:48:439 ":tests",
David Van Cleve8e9102f2020-01-21 22:42:2010 "//net/*",
11 "//services/network/",
David Van Cleve10a40f382020-01-11 00:48:4312 ]
13
David Van Cleve8e9102f2020-01-21 22:42:2014 public = [ "trust_token_store.h" ]
David Van Cleve10a40f382020-01-11 00:48:4315
David Van Cleve680ce7d2020-02-07 18:04:2416 friend = [
17 ":tests",
18 "//net:extras", # Friend //net:extras so that SQLiteTrustTokenPersister
19 # can implement TrustTokenPersister.
20 ]
David Van Cleve10a40f382020-01-11 00:48:4321
22 sources = [
23 "in_memory_trust_token_persister.cc",
24 "in_memory_trust_token_persister.h",
25 "trust_token_persister.h",
David Van Cleve8e9102f2020-01-21 22:42:2026 "trust_token_store.cc",
27 "types.cc",
28 "types.h",
David Van Cleve10a40f382020-01-11 00:48:4329 ]
30
31 deps = [
David Van Cleve10a40f382020-01-11 00:48:4332 ":storage_proto",
33 "//base",
34 "//url",
35 ]
David Van Cleve8e9102f2020-01-21 22:42:2036
37 public_deps = [ ":public_proto" ]
David Van Cleve10a40f382020-01-11 00:48:4338}
39
40source_set("tests") {
41 testonly = true
42
David Van Cleve8e9102f2020-01-21 22:42:2043 sources = [
44 "trust_token_persister_unittest.cc",
45 "trust_token_store_unittest.cc",
46 "types_unittest.cc",
47 ]
David Van Cleve10a40f382020-01-11 00:48:4348
49 deps = [
50 ":public_proto",
51 ":storage_proto",
52 ":trust_tokens",
53 "//base",
David Van Cleve8e9102f2020-01-21 22:42:2054 "//base/test:test_support",
David Van Cleve680ce7d2020-02-07 18:04:2455 "//net:extras", # for SQLiteTrustTokenPersister
David Van Cleve10a40f382020-01-11 00:48:4356 "//testing/gmock",
57 "//testing/gtest",
58 "//url",
59 ]
60}
61
62# public.proto contains datatypes intended
63# to be exposed to //net consumers.
64proto_library("public_proto") {
Nico Weber9d56b872020-01-14 17:10:4465 sources = [ "proto/public.proto" ]
David Van Cleve10a40f382020-01-11 00:48:4366}
67
68# storage.proto contains datatypes internal
69# to the implementation of Trust Token state
70# persistent storage.
71proto_library("storage_proto") {
72 visibility = [
73 ":trust_tokens",
74 ":tests",
David Van Cleve680ce7d2020-02-07 18:04:2475 "//net:extras",
David Van Cleve10a40f382020-01-11 00:48:4376 ]
Nico Weber9d56b872020-01-14 17:10:4477 sources = [ "proto/storage.proto" ]
78 deps = [ ":public_proto" ]
David Van Cleve10a40f382020-01-11 00:48:4379}