| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 # Paths to the JSON files are kind of gross. They're stored in the gypi | |
| 6 # relative to //components, since that's the working directory gyp seems | |
| 7 # to use for all of the components. When we depend on them here, we need | |
| 8 # to remove the leading domain_reliability, since *our* working directory | |
| 9 # is one level deeper. When we call bake_in_configs.py, we need to give | |
| 10 # it a properly-rebased path to //components so it can properly join the | |
| 11 # paths relative to that and find the JSON files. | |
| 12 | |
| 13 baked_in_configs_gypi = exec_script("//build/gypi_to_gn.py", | |
| 14 [ rebase_path("baked_in_configs.gypi") ], | |
| 15 "scope", | |
| 16 [ "baked_in_configs.gypi" ]) | |
| 17 | |
| 18 # The config file names in the .gypi are relative to "//components". | |
| 19 baked_in_configs = | |
| 20 rebase_path(baked_in_configs_gypi.baked_in_configs, ".", "//components") | |
| 21 | |
| 22 action("bake_in_configs") { | 5 action("bake_in_configs") { |
| 23 visibility = [ ":*" ] | 6 visibility = [ ":*" ] |
| 24 script = "bake_in_configs.py" | 7 script = "bake_in_configs.py" |
| 25 | 8 |
| 26 inputs = baked_in_configs + [ "baked_in_configs.gypi" ] | 9 inputs = [ |
| 10 "baked_in_configs/c_android_clients_google_com.json", |
| 11 "baked_in_configs/c_bigcache_googleapis_com.json", |
| 12 "baked_in_configs/c_doc-0-0-sj_sj_googleusercontent_com.json", |
| 13 "baked_in_configs/c_docs_google_com.json", |
| 14 "baked_in_configs/c_drive_google_com.json", |
| 15 "baked_in_configs/c_googlesyndication_com.json", |
| 16 "baked_in_configs/c_pack_google_com.json", |
| 17 "baked_in_configs/c_play_google_com.json", |
| 18 "baked_in_configs/c_youtube_com.json", |
| 19 "baked_in_configs/clients2_google_com.json", |
| 20 "baked_in_configs/docs_google_com.json", |
| 21 "baked_in_configs/google-analytics_com.json", |
| 22 "baked_in_configs/googlevideo_com.json", |
| 23 "baked_in_configs/gvt1_com.json", |
| 24 "baked_in_configs/gvt2_com.json", |
| 25 "baked_in_configs/ssl_gstatic_com.json", |
| 26 "baked_in_configs/www_google_com.json", |
| 27 ] |
| 28 |
| 27 output_file = "$target_gen_dir/baked_in_configs.cc" | 29 output_file = "$target_gen_dir/baked_in_configs.cc" |
| 28 outputs = [ | 30 outputs = [ |
| 29 output_file, | 31 output_file, |
| 30 ] | 32 ] |
| 31 | 33 |
| 32 # The JSON file list is too long for the command line on Windows, so put | 34 # The JSON file list is too long for the command line on Windows, so put |
| 33 # them in a response file. | 35 # them in a response file. |
| 34 response_file_contents = rebase_path(baked_in_configs, root_build_dir) | 36 response_file_contents = rebase_path(inputs, root_build_dir) |
| 35 args = [ | 37 args = [ |
| 36 "--file-list", | 38 "--file-list", |
| 37 "{{response_file_name}}", | 39 "{{response_file_name}}", |
| 38 "--output", | 40 "--output", |
| 39 rebase_path(output_file, root_build_dir), | 41 rebase_path(output_file, root_build_dir), |
| 40 ] | 42 ] |
| 41 } | 43 } |
| 42 | 44 |
| 43 component("domain_reliability") { | 45 component("domain_reliability") { |
| 44 sources = [ | 46 sources = [ |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 108 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 107 | 109 |
| 108 deps = [ | 110 deps = [ |
| 109 ":domain_reliability", | 111 ":domain_reliability", |
| 110 "//base", | 112 "//base", |
| 111 "//base/test:test_support", | 113 "//base/test:test_support", |
| 112 "//net:test_support", | 114 "//net:test_support", |
| 113 "//testing/gtest", | 115 "//testing/gtest", |
| 114 ] | 116 ] |
| 115 } | 117 } |
| OLD | NEW |