OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
6 import("//build/util/version.gni") | 6 import("//build/util/version.gni") |
7 import("//chrome/version.gni") | 7 import("//chrome/version.gni") |
8 import("//testing/test.gni") | 8 import("//testing/test.gni") |
| 9 import("//third_party/protobuf/proto_library.gni") |
9 import("//url/features.gni") | 10 import("//url/features.gni") |
10 | 11 |
11 assert(!is_component_build, "Cronet requires static library build.") | 12 assert(!is_component_build, "Cronet requires static library build.") |
12 | 13 |
13 declare_args() { | 14 declare_args() { |
14 cronet_enable_data_reduction_proxy_support = false | 15 cronet_enable_data_reduction_proxy_support = false |
15 } | 16 } |
16 | 17 |
17 process_version("cronet_version_header") { | 18 process_version("cronet_version_header") { |
18 template_file = "//components/cronet/version.h.in" | 19 template_file = "//components/cronet/version.h.in" |
19 output = "$target_gen_dir/version.h" | 20 output = "$target_gen_dir/version.h" |
20 extra_args = [ | 21 extra_args = [ |
21 "-e", | 22 "-e", |
22 "VERSION_FULL=\"%s.%s.%s.%s\" % (MAJOR,MINOR,BUILD,PATCH)", | 23 "VERSION_FULL=\"%s.%s.%s.%s\" % (MAJOR,MINOR,BUILD,PATCH)", |
23 ] | 24 ] |
24 } | 25 } |
25 | 26 |
| 27 proto_library("cronet_cert_proto") { |
| 28 visibility = [ ":cronet" ] |
| 29 |
| 30 sources = [ |
| 31 "//components/cronet/cert/proto/cert_verification.proto", |
| 32 ] |
| 33 |
| 34 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ] |
| 35 } |
| 36 |
26 source_set("cronet_sources") { | 37 source_set("cronet_sources") { |
27 deps = [ | 38 deps = [ |
| 39 ":cronet_cert_proto", |
28 ":cronet_version_header", | 40 ":cronet_version_header", |
29 "//base:base", | 41 "//base:base", |
30 "//components/metrics:metrics", | 42 "//components/metrics:metrics", |
31 "//components/metrics/proto:proto", | 43 "//components/metrics/proto:proto", |
32 "//components/prefs:prefs", | 44 "//components/prefs:prefs", |
33 "//net", | 45 "//net", |
| 46 "//third_party/protobuf:protobuf_lite", |
34 "//url", | 47 "//url", |
35 ] | 48 ] |
36 | 49 |
37 sources = [ | 50 sources = [ |
| 51 "../cert/cert_verifier_cache_persister.cc", |
| 52 "../cert/cert_verifier_cache_persister.h", |
38 "../histogram_manager.cc", | 53 "../histogram_manager.cc", |
39 "../histogram_manager.h", | 54 "../histogram_manager.h", |
40 "../url_request_context_config.cc", | 55 "../url_request_context_config.cc", |
41 "../url_request_context_config.h", | 56 "../url_request_context_config.h", |
42 "Cronet.h", | 57 "Cronet.h", |
43 "Cronet.mm", | 58 "Cronet.mm", |
44 "cronet_bidirectional_stream.cc", | 59 "cronet_bidirectional_stream.cc", |
45 "cronet_bidirectional_stream.h", | 60 "cronet_bidirectional_stream.h", |
46 "cronet_c_for_grpc.cc", | 61 "cronet_c_for_grpc.cc", |
47 "cronet_c_for_grpc.h", | 62 "cronet_c_for_grpc.h", |
(...skipping 21 matching lines...) Expand all Loading... |
69 "//net/data/ssl/certificates/quic_test.example.com.crt", | 84 "//net/data/ssl/certificates/quic_test.example.com.crt", |
70 "//net/data/ssl/certificates/quic_test.example.com.key", | 85 "//net/data/ssl/certificates/quic_test.example.com.key", |
71 "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8", | 86 "//net/data/ssl/certificates/quic_test.example.com.key.pkcs8", |
72 "//net/data/ssl/certificates/quic_test.example.com.key.sct", | 87 "//net/data/ssl/certificates/quic_test.example.com.key.sct", |
73 ] | 88 ] |
74 outputs = [ | 89 outputs = [ |
75 "{{bundle_resources_dir}}/{{source_file_part}}", | 90 "{{bundle_resources_dir}}/{{source_file_part}}", |
76 ] | 91 ] |
77 } | 92 } |
78 | 93 |
| 94 bundle_data("cronet_unittests_bundle_data") { |
| 95 testonly = true |
| 96 sources = [ |
| 97 "//net/data/ssl/certificates/ok_cert.pem", |
| 98 "//net/data/ssl/certificates/root_ca_cert.pem", |
| 99 ] |
| 100 outputs = [ |
| 101 "{{bundle_resources_dir}}/{{source_file_part}}", |
| 102 ] |
| 103 } |
| 104 |
79 test("cronet_test") { | 105 test("cronet_test") { |
80 testonly = true | 106 testonly = true |
81 sources = [ | 107 sources = [ |
82 "test/cronet_bidirectional_stream_test.mm", | 108 "test/cronet_bidirectional_stream_test.mm", |
83 "test/cronet_test_runner.mm", | 109 "test/cronet_test_runner.mm", |
84 "test/quic_test_server.cc", | 110 "test/quic_test_server.cc", |
85 "test/quic_test_server.h", | 111 "test/quic_test_server.h", |
86 ] | 112 ] |
87 | 113 |
88 deps = [ | 114 deps = [ |
| 115 ":cronet_cert_proto", |
89 ":cronet_sources", | 116 ":cronet_sources", |
90 ":cronet_test_bundle_data", | 117 ":cronet_test_bundle_data", |
91 ":cronet_version_header", | 118 ":cronet_version_header", |
92 "//base", | 119 "//base", |
93 "//base:i18n", | 120 "//base:i18n", |
94 "//net", | 121 "//net", |
95 "//net:simple_quic_tools", | 122 "//net:simple_quic_tools", |
96 "//net:test_support", | 123 "//net:test_support", |
97 "//third_party/icu", | 124 "//third_party/icu", |
98 ] | 125 ] |
99 } | 126 } |
100 | 127 |
101 test("cronet_unittests") { | 128 test("cronet_unittests") { |
102 sources = [ | 129 sources = [ |
| 130 "//components/cronet/cert/cert_verifier_cache_persister_unittest.cc", |
103 "//components/cronet/histogram_manager_unittest.cc", | 131 "//components/cronet/histogram_manager_unittest.cc", |
104 "//components/cronet/run_all_unittests.cc", | 132 "//components/cronet/run_all_unittests.cc", |
105 "//components/cronet/url_request_context_config_unittest.cc", | 133 "//components/cronet/url_request_context_config_unittest.cc", |
106 ] | 134 ] |
107 | 135 |
108 deps = [ | 136 deps = [ |
| 137 ":cronet_cert_proto", |
109 ":cronet_sources", | 138 ":cronet_sources", |
| 139 ":cronet_test_bundle_data", |
110 "//base", | 140 "//base", |
111 "//base/test:test_support", | 141 "//base/test:test_support", |
112 "//components/metrics", | 142 "//components/metrics", |
113 "//net", | 143 "//net", |
| 144 "//net:test_support", |
114 "//testing/gtest", | 145 "//testing/gtest", |
115 ] | 146 ] |
116 } | 147 } |
117 | 148 |
118 _package_dir = "$root_out_dir/cronet" | 149 _package_dir = "$root_out_dir/cronet" |
119 | 150 |
120 action("generate_license") { | 151 action("generate_license") { |
121 _license_path = "$_package_dir/LICENSE" | 152 _license_path = "$_package_dir/LICENSE" |
122 | 153 |
123 script = "//components/cronet/tools/cronet_licenses.py" | 154 script = "//components/cronet/tools/cronet_licenses.py" |
(...skipping 23 matching lines...) Expand all Loading... |
147 ":cronet_shared", | 178 ":cronet_shared", |
148 ] | 179 ] |
149 } | 180 } |
150 | 181 |
151 group("cronet_package") { | 182 group("cronet_package") { |
152 deps = [ | 183 deps = [ |
153 ":cronet_package_copy", | 184 ":cronet_package_copy", |
154 ":generate_license", | 185 ":generate_license", |
155 ] | 186 ] |
156 } | 187 } |
OLD | NEW |