| 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/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
| 7 import("//build/config/android/rules.gni") | 7 import("//build/config/android/rules.gni") |
| 8 import("//build/util/process_version.gni") | 8 import("//build/util/process_version.gni") |
| 9 import("//build/util/version.gni") | 9 import("//build/util/version.gni") |
| 10 import("//testing/test.gni") | 10 import("//testing/test.gni") |
| 11 import("//third_party/netty4/netty4.gni") | 11 import("//third_party/netty4/netty4.gni") |
| 12 import("//third_party/protobuf/proto_library.gni") | 12 import("//third_party/protobuf/proto_library.gni") |
| 13 import("//url/features.gni") | 13 import("//url/features.gni") |
| 14 | 14 |
| 15 assert(!is_component_build, "Cronet requires static library build.") | 15 assert(!is_component_build, "Cronet requires static library build.") |
| 16 | 16 |
| 17 declare_args() { | |
| 18 cronet_enable_data_reduction_proxy_support = false | |
| 19 } | |
| 20 | |
| 21 generate_jni("cronet_jni_headers") { | 17 generate_jni("cronet_jni_headers") { |
| 22 sources = [ | 18 sources = [ |
| 23 "java/src/org/chromium/net/impl/CronetBidirectionalStream.java", | 19 "java/src/org/chromium/net/impl/CronetBidirectionalStream.java", |
| 24 "java/src/org/chromium/net/impl/CronetLibraryLoader.java", | 20 "java/src/org/chromium/net/impl/CronetLibraryLoader.java", |
| 25 "java/src/org/chromium/net/impl/CronetUploadDataStream.java", | 21 "java/src/org/chromium/net/impl/CronetUploadDataStream.java", |
| 26 "java/src/org/chromium/net/impl/CronetUrlRequest.java", | 22 "java/src/org/chromium/net/impl/CronetUrlRequest.java", |
| 27 "java/src/org/chromium/net/impl/CronetUrlRequestContext.java", | 23 "java/src/org/chromium/net/impl/CronetUrlRequestContext.java", |
| 28 ] | 24 ] |
| 29 jni_package = "cronet" | 25 jni_package = "cronet" |
| 30 } | 26 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 "//base/third_party/dynamic_annotations", | 170 "//base/third_party/dynamic_annotations", |
| 175 "//components/metrics", | 171 "//components/metrics", |
| 176 "//components/prefs", | 172 "//components/prefs", |
| 177 "//url:url_features", | 173 "//url:url_features", |
| 178 ] | 174 ] |
| 179 sources = [ | 175 sources = [ |
| 180 "//components/cronet/android/cert/cert_verifier_cache_serializer.cc", | 176 "//components/cronet/android/cert/cert_verifier_cache_serializer.cc", |
| 181 "//components/cronet/android/cert/cert_verifier_cache_serializer.h", | 177 "//components/cronet/android/cert/cert_verifier_cache_serializer.h", |
| 182 "//components/cronet/android/cronet_bidirectional_stream_adapter.cc", | 178 "//components/cronet/android/cronet_bidirectional_stream_adapter.cc", |
| 183 "//components/cronet/android/cronet_bidirectional_stream_adapter.h", | 179 "//components/cronet/android/cronet_bidirectional_stream_adapter.h", |
| 184 "//components/cronet/android/cronet_in_memory_pref_store.cc", | |
| 185 "//components/cronet/android/cronet_in_memory_pref_store.h", | |
| 186 "//components/cronet/android/cronet_library_loader.cc", | 180 "//components/cronet/android/cronet_library_loader.cc", |
| 187 "//components/cronet/android/cronet_library_loader.h", | 181 "//components/cronet/android/cronet_library_loader.h", |
| 188 "//components/cronet/android/cronet_upload_data_stream.cc", | 182 "//components/cronet/android/cronet_upload_data_stream.cc", |
| 189 "//components/cronet/android/cronet_upload_data_stream.h", | 183 "//components/cronet/android/cronet_upload_data_stream.h", |
| 190 "//components/cronet/android/cronet_upload_data_stream_adapter.cc", | 184 "//components/cronet/android/cronet_upload_data_stream_adapter.cc", |
| 191 "//components/cronet/android/cronet_upload_data_stream_adapter.h", | 185 "//components/cronet/android/cronet_upload_data_stream_adapter.h", |
| 192 "//components/cronet/android/cronet_url_request_adapter.cc", | 186 "//components/cronet/android/cronet_url_request_adapter.cc", |
| 193 "//components/cronet/android/cronet_url_request_adapter.h", | 187 "//components/cronet/android/cronet_url_request_adapter.h", |
| 194 "//components/cronet/android/cronet_url_request_context_adapter.cc", | 188 "//components/cronet/android/cronet_url_request_context_adapter.cc", |
| 195 "//components/cronet/android/cronet_url_request_context_adapter.h", | 189 "//components/cronet/android/cronet_url_request_context_adapter.h", |
| (...skipping 16 matching lines...) Expand all Loading... |
| 212 cflags = [ | 206 cflags = [ |
| 213 "-DLOGGING=1", | 207 "-DLOGGING=1", |
| 214 "-Wno-sign-promo", | 208 "-Wno-sign-promo", |
| 215 ] | 209 ] |
| 216 | 210 |
| 217 libs = [ | 211 libs = [ |
| 218 "android", | 212 "android", |
| 219 "log", | 213 "log", |
| 220 ] | 214 ] |
| 221 | 215 |
| 222 if (cronet_enable_data_reduction_proxy_support) { | |
| 223 defines += [ "DATA_REDUCTION_PROXY_SUPPORT" ] | |
| 224 sources += [ | |
| 225 "//components/cronet/android/cronet_data_reduction_proxy.cc", | |
| 226 "//components/cronet/android/cronet_data_reduction_proxy.h", | |
| 227 ] | |
| 228 } | |
| 229 | |
| 230 if (defined(invoker.defines)) { | 216 if (defined(invoker.defines)) { |
| 231 defines += invoker.defines | 217 defines += invoker.defines |
| 232 } | 218 } |
| 233 | 219 |
| 234 if (defined(invoker.deps)) { | 220 if (defined(invoker.deps)) { |
| 235 deps += invoker.deps | 221 deps += invoker.deps |
| 236 } | 222 } |
| 237 } | 223 } |
| 238 } | 224 } |
| 239 | 225 |
| 240 cronet_static_tmpl("cronet_static") { | 226 cronet_static_tmpl("cronet_static") { |
| 241 deps = [ | 227 deps = [ |
| 242 "//net", | 228 "//net", |
| 243 "//url", | 229 "//url", |
| 244 ] | 230 ] |
| 245 | 231 |
| 246 if (cronet_enable_data_reduction_proxy_support) { | |
| 247 deps += [ | |
| 248 "//components/data_reduction_proxy/core/browser:browser_small", | |
| 249 "//components/data_reduction_proxy/core/common", | |
| 250 ] | |
| 251 } | |
| 252 | |
| 253 if (!use_platform_icu_alternatives) { | 232 if (!use_platform_icu_alternatives) { |
| 254 deps += [ "//base:i18n" ] | 233 deps += [ "//base:i18n" ] |
| 255 } | 234 } |
| 256 } | 235 } |
| 257 | 236 |
| 258 _cronet_shared_lib_name = "cronet.$chrome_version_full" | 237 _cronet_shared_lib_name = "cronet.$chrome_version_full" |
| 259 _cronet_shared_lib_file_name = "lib" + _cronet_shared_lib_name + ".so" | 238 _cronet_shared_lib_file_name = "lib" + _cronet_shared_lib_name + ".so" |
| 260 | 239 |
| 261 shared_library("cronet") { | 240 shared_library("cronet") { |
| 262 output_name = _cronet_shared_lib_name | 241 output_name = _cronet_shared_lib_name |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 "//base:i18n", | 520 "//base:i18n", |
| 542 "//base/test:test_support", | 521 "//base/test:test_support", |
| 543 "//components/prefs", | 522 "//components/prefs", |
| 544 "//net", | 523 "//net", |
| 545 "//net:simple_quic_tools", | 524 "//net:simple_quic_tools", |
| 546 "//net:test_support", | 525 "//net:test_support", |
| 547 "//third_party/icu", | 526 "//third_party/icu", |
| 548 ] | 527 ] |
| 549 | 528 |
| 550 include_dirs = [ _cronet_version_header_include_dir ] | 529 include_dirs = [ _cronet_version_header_include_dir ] |
| 551 | |
| 552 if (cronet_enable_data_reduction_proxy_support) { | |
| 553 deps += [ "//components/data_reduction_proxy/core/browser:browser_small" ] | |
| 554 } | |
| 555 } | 530 } |
| 556 | 531 |
| 557 android_resources("cronet_test_apk_resources") { | 532 android_resources("cronet_test_apk_resources") { |
| 558 testonly = true | 533 testonly = true |
| 559 resource_dirs = [ | 534 resource_dirs = [ |
| 560 "test/res", | 535 "test/res", |
| 561 "test/smoketests/res/native", | 536 "test/smoketests/res/native", |
| 562 ] | 537 ] |
| 563 android_manifest = "test/AndroidManifest.xml" | 538 android_manifest = "test/AndroidManifest.xml" |
| 564 } | 539 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 | 600 |
| 626 android_assets("cronet_test_apk_assets") { | 601 android_assets("cronet_test_apk_assets") { |
| 627 testonly = true | 602 testonly = true |
| 628 | 603 |
| 629 # Need to use renaming_sources to maintain subdirectories. | 604 # Need to use renaming_sources to maintain subdirectories. |
| 630 renaming_sources = [ | 605 renaming_sources = [ |
| 631 "test/assets/test/cacheable.txt", | 606 "test/assets/test/cacheable.txt", |
| 632 "test/assets/test/cacheable.txt.mock-http-headers", | 607 "test/assets/test/cacheable.txt.mock-http-headers", |
| 633 "test/assets/test/content_length_mismatch.html", | 608 "test/assets/test/content_length_mismatch.html", |
| 634 "test/assets/test/content_length_mismatch.html.mock-http-headers", | 609 "test/assets/test/content_length_mismatch.html.mock-http-headers", |
| 635 "test/assets/test/datareductionproxysuccess.txt", | |
| 636 "test/assets/test/datareductionproxysuccess.txt.mock-http-headers", | |
| 637 "test/assets/test/gzipped.html", | 610 "test/assets/test/gzipped.html", |
| 638 "test/assets/test/gzipped.html.mock-http-headers", | 611 "test/assets/test/gzipped.html.mock-http-headers", |
| 639 "test/assets/test/multiredirect.html", | 612 "test/assets/test/multiredirect.html", |
| 640 "test/assets/test/multiredirect.html.mock-http-headers", | 613 "test/assets/test/multiredirect.html.mock-http-headers", |
| 641 "test/assets/test/notfound.html", | 614 "test/assets/test/notfound.html", |
| 642 "test/assets/test/notfound.html.mock-http-headers", | 615 "test/assets/test/notfound.html.mock-http-headers", |
| 643 "test/assets/test/quic_data/simple.txt", | 616 "test/assets/test/quic_data/simple.txt", |
| 644 "test/assets/test/redirect.html", | 617 "test/assets/test/redirect.html", |
| 645 "test/assets/test/redirect.html.mock-http-headers", | 618 "test/assets/test/redirect.html.mock-http-headers", |
| 646 "test/assets/test/redirect_invalid_scheme.html", | 619 "test/assets/test/redirect_invalid_scheme.html", |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1498 deps = [ | 1471 deps = [ |
| 1499 ":cronet_package_copy_native_test_lib", | 1472 ":cronet_package_copy_native_test_lib", |
| 1500 ":cronet_package_copy_native_test_lib_unstripped", | 1473 ":cronet_package_copy_native_test_lib_unstripped", |
| 1501 ":cronet_package_copy_test_assets", | 1474 ":cronet_package_copy_test_assets", |
| 1502 ":cronet_package_copy_test_files", | 1475 ":cronet_package_copy_test_files", |
| 1503 ":cronet_package_copy_test_support_apks", | 1476 ":cronet_package_copy_test_support_apks", |
| 1504 ":repackage_extracted_test_jars", | 1477 ":repackage_extracted_test_jars", |
| 1505 ] | 1478 ] |
| 1506 } | 1479 } |
| 1507 } | 1480 } |
| OLD | NEW |