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

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: 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
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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 if (enable_websockets) { 1711 if (enable_websockets) {
1711 sources += [ "websockets/websocket_frame_perftest.cc" ] 1712 sources += [ "websockets/websocket_frame_perftest.cc" ]
1712 } 1713 }
1713 1714
1714 if (use_v8_in_net) { 1715 if (use_v8_in_net) {
1715 deps += [ ":net_with_v8" ] 1716 deps += [ ":net_with_v8" ]
1716 } else { 1717 } else {
1717 sources -= [ "proxy/proxy_resolver_perftest.cc" ] 1718 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1718 } 1719 }
1719 } 1720 }
1721
1722 buildflag_header("features") {
1723 header = "net_features.h"
1724
1725 flags = [ "ENABLE_BIDIRECTIONAL_STREAM=$enable_bidirectional_stream" ]
1726 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698