Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Side by Side Diff: net/BUILD.gn

Issue 1550843002: Convert enable_bidirectional_stream into build flag local to net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/common.gypi ('k') | net/http/bidirectional_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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/config/chromecast_build.gni") 6 import("//build/config/chromecast_build.gni")
6 import("//build/config/compiler/compiler.gni") 7 import("//build/config/compiler/compiler.gni")
7 import("//build/config/crypto.gni") 8 import("//build/config/crypto.gni")
8 import("//build/config/features.gni") 9 import("//build/config/features.gni")
9 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
10 import("//build_overrides/v8.gni") 11 import("//build_overrides/v8.gni")
11 import("//testing/test.gni") 12 import("//testing/test.gni")
12 import("//third_party/icu/config.gni") 13 import("//third_party/icu/config.gni")
13 import("//third_party/protobuf/proto_library.gni") 14 import("//third_party/protobuf/proto_library.gni")
14 import("//tools/grit/grit_rule.gni") 15 import("//tools/grit/grit_rule.gni")
(...skipping 21 matching lines...) Expand all
36 # android devices, but we cannot be so sure about the variety of ARM devices. 37 # android devices, but we cannot be so sure about the variety of ARM devices.
37 # So enable it for x86 only for now. 38 # So enable it for x86 only for now.
38 posix_avoid_mmap = is_android && current_cpu != "x86" 39 posix_avoid_mmap = is_android && current_cpu != "x86"
39 40
40 use_v8_in_net = !is_ios 41 use_v8_in_net = !is_ios
41 enable_built_in_dns = !is_ios 42 enable_built_in_dns = !is_ios
42 43
43 declare_args() { 44 declare_args() {
44 # Disables support for file URLs. File URL support requires use of icu. 45 # Disables support for file URLs. File URL support requires use of icu.
45 disable_file_support = false 46 disable_file_support = false
47
48 # Enables BidirectionalStream; Used in cronet, disabled by default.
46 enable_bidirectional_stream = false 49 enable_bidirectional_stream = false
47 50
48 # WebSockets and socket stream code are not used on iOS and are optional in 51 # WebSockets and socket stream code are not used on iOS and are optional in
49 # cronet. 52 # cronet.
50 enable_websockets = !is_ios 53 enable_websockets = !is_ios
51 disable_ftp_support = is_ios 54 disable_ftp_support = is_ios
52 } 55 }
53 56
54 config("net_config") { 57 config("net_config") {
55 defines = [] 58 defines = []
56 if (posix_avoid_mmap) { 59 if (posix_avoid_mmap) {
57 defines += [ "POSIX_AVOID_MMAP" ] 60 defines += [ "POSIX_AVOID_MMAP" ]
58 } 61 }
59 if (disable_file_support) { 62 if (disable_file_support) {
60 defines += [ "DISABLE_FILE_SUPPORT" ] 63 defines += [ "DISABLE_FILE_SUPPORT" ]
61 } 64 }
62 if (disable_ftp_support) { 65 if (disable_ftp_support) {
63 defines += [ "DISABLE_FTP_SUPPORT=1" ] 66 defines += [ "DISABLE_FTP_SUPPORT=1" ]
64 } 67 }
65 if (enable_bidirectional_stream) {
66 defines += [ "ENABLE_BIDIRECTIONAL_STREAM=1" ]
67 }
68 } 68 }
69 69
70 # net_internal_config is shared with net and net_small. 70 # net_internal_config is shared with net and net_small.
71 config("net_internal_config") { 71 config("net_internal_config") {
72 defines = [ 72 defines = [
73 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to 73 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to
74 # 0) which implies that we run pkg_config on kerberos and link to that 74 # 0) which implies that we run pkg_config on kerberos and link to that
75 # rather than setting this define which will dynamically open it. That 75 # rather than setting this define which will dynamically open it. That
76 # doesn't seem to be set in the regular builds, so we're skipping this 76 # doesn't seem to be set in the regular builds, so we're skipping this
77 # capability here. 77 # capability here.
(...skipping 20 matching lines...) Expand all
98 98
99 net_shared_configs = [ 99 net_shared_configs = [
100 ":net_internal_config", 100 ":net_internal_config",
101 "//build/config:precompiled_headers", 101 "//build/config:precompiled_headers",
102 102
103 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 103 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
104 "//build/config/compiler:no_size_t_to_int_warning", 104 "//build/config/compiler:no_size_t_to_int_warning",
105 ] 105 ]
106 106
107 net_shared_public_deps = [ 107 net_shared_public_deps = [
108 ":features",
108 ":net_quic_proto", 109 ":net_quic_proto",
109 "//crypto", 110 "//crypto",
110 "//crypto:platform", 111 "//crypto:platform",
111 ] 112 ]
112 113
113 net_shared_deps = [ 114 net_shared_deps = [
114 ":net_resources", 115 ":net_resources",
115 "//base", 116 "//base",
116 "//net/base/registry_controlled_domains", 117 "//net/base/registry_controlled_domains",
117 "//third_party/protobuf:protobuf_lite", 118 "//third_party/protobuf:protobuf_lite",
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 ] 485 ]
485 486
486 # Use ICU alternative on Android. 487 # Use ICU alternative on Android.
487 sources += [ 488 sources += [
488 "base/net_string_util_icu_alternatives_android.cc", 489 "base/net_string_util_icu_alternatives_android.cc",
489 "base/net_string_util_icu_alternatives_android.h", 490 "base/net_string_util_icu_alternatives_android.h",
490 ] 491 ]
491 492
492 # Disable Brotli support. 493 # Disable Brotli support.
493 sources += [ "filter/brotli_filter_disabled.cc" ] 494 sources += [ "filter/brotli_filter_disabled.cc" ]
495
496 if (enable_bidirectional_stream) {
497 sources += gypi_values.net_bidirectional_stream_sources
498 }
494 } 499 }
495 } 500 }
496 501
497 grit("net_resources") { 502 grit("net_resources") {
498 source = "base/net_resources.grd" 503 source = "base/net_resources.grd"
499 use_qualified_include = true 504 use_qualified_include = true
500 outputs = [ 505 outputs = [
501 "grit/net_resources.h", 506 "grit/net_resources.h",
502 "net_resources.pak", 507 "net_resources.pak",
503 ] 508 ]
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 if (enable_websockets) { 1726 if (enable_websockets) {
1722 sources += [ "websockets/websocket_frame_perftest.cc" ] 1727 sources += [ "websockets/websocket_frame_perftest.cc" ]
1723 } 1728 }
1724 1729
1725 if (use_v8_in_net) { 1730 if (use_v8_in_net) {
1726 deps += [ ":net_with_v8" ] 1731 deps += [ ":net_with_v8" ]
1727 } else { 1732 } else {
1728 sources -= [ "proxy/proxy_resolver_perftest.cc" ] 1733 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1729 } 1734 }
1730 } 1735 }
1736
1737 buildflag_header("features") {
1738 header = "net_features.h"
1739
1740 flags = [ "ENABLE_BIDIRECTIONAL_STREAM=$enable_bidirectional_stream" ]
1741 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | net/http/bidirectional_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698