David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 1 | # 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 | |
| 5 | import("//third_party/protobuf/proto_library.gni") |
| 6 | |
| 7 | source_set("trust_tokens") { |
| 8 | visibility = [ |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 9 | ":tests", |
David Van Cleve | 8e9102f | 2020-01-21 22:42:20 | [diff] [blame] | 10 | "//net/*", |
| 11 | "//services/network/", |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 12 | ] |
| 13 | |
David Van Cleve | 8e9102f | 2020-01-21 22:42:20 | [diff] [blame] | 14 | public = [ "trust_token_store.h" ] |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 15 | |
David Van Cleve | 680ce7d | 2020-02-07 18:04:24 | [diff] [blame] | 16 | friend = [ |
| 17 | ":tests", |
| 18 | "//net:extras", # Friend //net:extras so that SQLiteTrustTokenPersister |
| 19 | # can implement TrustTokenPersister. |
| 20 | ] |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 21 | |
| 22 | sources = [ |
| 23 | "in_memory_trust_token_persister.cc", |
| 24 | "in_memory_trust_token_persister.h", |
| 25 | "trust_token_persister.h", |
David Van Cleve | 8e9102f | 2020-01-21 22:42:20 | [diff] [blame] | 26 | "trust_token_store.cc", |
| 27 | "types.cc", |
| 28 | "types.h", |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 29 | ] |
| 30 | |
| 31 | deps = [ |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 32 | ":storage_proto", |
| 33 | "//base", |
| 34 | "//url", |
| 35 | ] |
David Van Cleve | 8e9102f | 2020-01-21 22:42:20 | [diff] [blame] | 36 | |
| 37 | public_deps = [ ":public_proto" ] |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | source_set("tests") { |
| 41 | testonly = true |
| 42 | |
David Van Cleve | 8e9102f | 2020-01-21 22:42:20 | [diff] [blame] | 43 | sources = [ |
| 44 | "trust_token_persister_unittest.cc", |
| 45 | "trust_token_store_unittest.cc", |
| 46 | "types_unittest.cc", |
| 47 | ] |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 48 | |
| 49 | deps = [ |
| 50 | ":public_proto", |
| 51 | ":storage_proto", |
| 52 | ":trust_tokens", |
| 53 | "//base", |
David Van Cleve | 8e9102f | 2020-01-21 22:42:20 | [diff] [blame] | 54 | "//base/test:test_support", |
David Van Cleve | 680ce7d | 2020-02-07 18:04:24 | [diff] [blame] | 55 | "//net:extras", # for SQLiteTrustTokenPersister |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 56 | "//testing/gmock", |
| 57 | "//testing/gtest", |
| 58 | "//url", |
| 59 | ] |
| 60 | } |
| 61 | |
| 62 | # public.proto contains datatypes intended |
| 63 | # to be exposed to //net consumers. |
| 64 | proto_library("public_proto") { |
Nico Weber | 9d56b87 | 2020-01-14 17:10:44 | [diff] [blame] | 65 | sources = [ "proto/public.proto" ] |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | # storage.proto contains datatypes internal |
| 69 | # to the implementation of Trust Token state |
| 70 | # persistent storage. |
| 71 | proto_library("storage_proto") { |
| 72 | visibility = [ |
| 73 | ":trust_tokens", |
| 74 | ":tests", |
David Van Cleve | 680ce7d | 2020-02-07 18:04:24 | [diff] [blame] | 75 | "//net:extras", |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 76 | ] |
Nico Weber | 9d56b87 | 2020-01-14 17:10:44 | [diff] [blame] | 77 | sources = [ "proto/storage.proto" ] |
| 78 | deps = [ ":public_proto" ] |
David Van Cleve | 10a40f38 | 2020-01-11 00:48:43 | [diff] [blame] | 79 | } |