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

Side by Side Diff: components/cronet/ios/BUILD.gn

Issue 2665703002: [cronet] Make getAcceptLanguages index a static table instead of the application bundle. (Closed)
Patch Set: fix accept languages for cronet testing to make tests more deterministic Created 3 years, 9 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 | « no previous file | components/cronet/ios/Cronet.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 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/ios/rules.gni") 6 import("//build/config/ios/rules.gni")
7 import("//build/config/mac/symbols.gni") 7 import("//build/config/mac/symbols.gni")
8 import("//build/mac/tweak_info_plist.gni") 8 import("//build/mac/tweak_info_plist.gni")
9 import("//build/util/process_version.gni") 9 import("//build/util/process_version.gni")
10 import("//build/util/version.gni") 10 import("//build/util/version.gni")
(...skipping 15 matching lines...) Expand all
26 output = "$target_gen_dir/version.h" 26 output = "$target_gen_dir/version.h"
27 extra_args = [ 27 extra_args = [
28 "-e", 28 "-e",
29 "VERSION_FULL=\"%s.%s.%s.%s\" % (MAJOR,MINOR,BUILD,PATCH)", 29 "VERSION_FULL=\"%s.%s.%s.%s\" % (MAJOR,MINOR,BUILD,PATCH)",
30 ] 30 ]
31 } 31 }
32 32
33 source_set("cronet_sources") { 33 source_set("cronet_sources") {
34 deps = [ 34 deps = [
35 ":cronet_version_header", 35 ":cronet_version_header",
36 ":generate_accept_languages",
36 "//base:base", 37 "//base:base",
37 "//components/grpc_support", 38 "//components/grpc_support",
38 "//components/metrics:metrics", 39 "//components/metrics:metrics",
39 "//components/metrics/proto:proto", 40 "//components/metrics/proto:proto",
40 "//components/prefs:prefs", 41 "//components/prefs:prefs",
41 "//ios/net:net", 42 "//ios/net:net",
42 "//ios/web:user_agent", 43 "//ios/web:user_agent",
43 "//net", 44 "//net",
44 "//url", 45 "//url",
45 ] 46 ]
(...skipping 17 matching lines...) Expand all
63 if (!use_platform_icu_alternatives) { 64 if (!use_platform_icu_alternatives) {
64 deps += [ "//base:i18n" ] 65 deps += [ "//base:i18n" ]
65 } 66 }
66 } 67 }
67 68
68 # Tweak |info_plist| with current version and revision. 69 # Tweak |info_plist| with current version and revision.
69 tweak_info_plist("tweak_cronet_plist") { 70 tweak_info_plist("tweak_cronet_plist") {
70 info_plist = "Info.plist" 71 info_plist = "Info.plist"
71 } 72 }
72 73
73 bundle_data("cronet_framework_resources") {
74 # This bundle contains "Accept-Languages" header values for known locales.
75 # TODO(mef): These strings should be auto-generated from chrome's .xtb
76 # files, not hardcoded.
77 sources = [
78 "Resources/Localization/am.lproj",
79 "Resources/Localization/ar.lproj",
80 "Resources/Localization/bg.lproj",
81 "Resources/Localization/bn.lproj",
82 "Resources/Localization/ca.lproj",
83 "Resources/Localization/cs.lproj",
84 "Resources/Localization/da.lproj",
85 "Resources/Localization/de.lproj",
86 "Resources/Localization/el.lproj",
87 "Resources/Localization/en-GB.lproj",
88 "Resources/Localization/en.lproj",
89 "Resources/Localization/es-419.lproj",
90 "Resources/Localization/es.lproj",
91 "Resources/Localization/fa.lproj",
92 "Resources/Localization/fi.lproj",
93 "Resources/Localization/fil.lproj",
94 "Resources/Localization/fr.lproj",
95 "Resources/Localization/gu.lproj",
96 "Resources/Localization/he.lproj",
97 "Resources/Localization/hi.lproj",
98 "Resources/Localization/hr.lproj",
99 "Resources/Localization/hu.lproj",
100 "Resources/Localization/id.lproj",
101 "Resources/Localization/it.lproj",
102 "Resources/Localization/ja.lproj",
103 "Resources/Localization/kn.lproj",
104 "Resources/Localization/ko.lproj",
105 "Resources/Localization/lt.lproj",
106 "Resources/Localization/lv.lproj",
107 "Resources/Localization/ml.lproj",
108 "Resources/Localization/mr.lproj",
109 "Resources/Localization/ms.lproj",
110 "Resources/Localization/nb.lproj",
111 "Resources/Localization/nl.lproj",
112 "Resources/Localization/pl.lproj",
113 "Resources/Localization/pt-BR.lproj",
114 "Resources/Localization/pt-PT.lproj",
115 "Resources/Localization/pt.lproj",
116 "Resources/Localization/ro.lproj",
117 "Resources/Localization/ru.lproj",
118 "Resources/Localization/sk.lproj",
119 "Resources/Localization/sl.lproj",
120 "Resources/Localization/sr.lproj",
121 "Resources/Localization/sv.lproj",
122 "Resources/Localization/sw.lproj",
123 "Resources/Localization/ta.lproj",
124 "Resources/Localization/te.lproj",
125 "Resources/Localization/th.lproj",
126 "Resources/Localization/tr.lproj",
127 "Resources/Localization/uk.lproj",
128 "Resources/Localization/vi.lproj",
129 "Resources/Localization/zh-Hans.lproj",
130 "Resources/Localization/zh-Hant.lproj",
131 "Resources/Localization/zh.lproj",
132 ]
133 outputs = [
134 "{{bundle_resources_dir}}/cronet_resources.bundle/{{source_file_part}}",
135 ]
136 }
137
138 ios_framework_bundle("cronet_framework") { 74 ios_framework_bundle("cronet_framework") {
139 output_name = "Cronet" 75 output_name = "Cronet"
140 info_plist_target = ":tweak_cronet_plist" 76 info_plist_target = ":tweak_cronet_plist"
141 77
142 deps = [ 78 deps = [
143 ":cronet_framework_resources",
144 ":cronet_sources", 79 ":cronet_sources",
145 "//base", 80 "//base",
146 "//net:net", 81 "//net:net",
147 ] 82 ]
148 83
149 libs = [ "UIKit.Framework" ] 84 libs = [ "UIKit.Framework" ]
150 85
151 include_dirs = [ "//components/grpc_support/include" ] 86 include_dirs = [ "//components/grpc_support/include" ]
152 87
153 public_deps = [ 88 public_deps = [
(...skipping 28 matching lines...) Expand all
182 ":cronet_sources", 117 ":cronet_sources",
183 "//base", 118 "//base",
184 "//base/test:test_support", 119 "//base/test:test_support",
185 "//components/cronet/ios/test:cronet_test", 120 "//components/cronet/ios/test:cronet_test",
186 "//components/metrics", 121 "//components/metrics",
187 "//net", 122 "//net",
188 "//testing/gtest", 123 "//testing/gtest",
189 ] 124 ]
190 } 125 }
191 126
127 action("generate_accept_languages") {
128 script = "//components/cronet/ios/generate_accept_languages.py"
mef 2017/03/02 20:22:43 FWIW we currently have all scripts in components/c
129 args = [
130 rebase_path("$target_gen_dir"),
131 rebase_path("//"),
132 ]
133 outputs = [
134 "$target_gen_dir/accept_languages_table.h",
135 ]
136 }
137
192 if (additional_toolchains == [] || current_toolchain == default_toolchain) { 138 if (additional_toolchains == [] || current_toolchain == default_toolchain) {
193 _package_dir = "$root_out_dir/cronet" 139 _package_dir = "$root_out_dir/cronet"
194 140
195 action("generate_license") { 141 action("generate_license") {
196 _license_path = "$_package_dir/LICENSE" 142 _license_path = "$_package_dir/LICENSE"
197 143
198 script = "//components/cronet/tools/cronet_licenses.py" 144 script = "//components/cronet/tools/cronet_licenses.py"
199 inputs = [ 145 inputs = [
200 "//build/util/LASTCHANGE", 146 "//build/util/LASTCHANGE",
201 "//buildtools/$host_os/gn", 147 "//buildtools/$host_os/gn",
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 206 }
261 207
262 group("cronet_package") { 208 group("cronet_package") {
263 deps = [ 209 deps = [
264 ":cronet_dsym_archive", 210 ":cronet_dsym_archive",
265 ":cronet_package_copy", 211 ":cronet_package_copy",
266 ":generate_license", 212 ":generate_license",
267 ] 213 ]
268 } 214 }
269 } 215 }
OLDNEW
« no previous file with comments | « no previous file | components/cronet/ios/Cronet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698