Commit 91d04092 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Reformat all gn files in /tools/, /url/

`gn format` recently changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.

Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.

This CL was uploaded by me.

Bug: 1041419
Change-Id: I730b20897134a058e4f98b5279d4dc3409c6cab7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2012602
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733900}
parent eada65d6
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
# found in the LICENSE file. # found in the LICENSE file.
static_library("cygprofile_win") { static_library("cygprofile_win") {
sources = [ sources = [ "cygprofile.cc" ]
"cygprofile.cc",
]
# Don't instrument this library. # Don't instrument this library.
configs -= [ "//build/config/win:default_cygprofile_instrumentation" ] configs -= [ "//build/config/win:default_cygprofile_instrumentation" ]
......
...@@ -3,16 +3,10 @@ ...@@ -3,16 +3,10 @@
# found in the LICENSE file. # found in the LICENSE file.
executable("dump_process") { executable("dump_process") {
sources = [ sources = [ "dump_process.cc" ]
"dump_process.cc", deps = [ "//base" ]
]
deps = [
"//base",
]
} }
group("all") { group("all") {
deps = [ deps = [ ":dump_process" ]
":dump_process",
]
} }
...@@ -12,15 +12,11 @@ action("grit_sources") { ...@@ -12,15 +12,11 @@ action("grit_sources") {
depfile = "$target_out_dir/grit_sources.d" depfile = "$target_out_dir/grit_sources.d"
script = "stamp_grit_sources.py" script = "stamp_grit_sources.py"
inputs = [ inputs = [ "grit.py" ]
"grit.py",
]
# Note that we can't call this "grit_sources.stamp" because that file is # Note that we can't call this "grit_sources.stamp" because that file is
# implicitly created by GN for script actions. # implicitly created by GN for script actions.
outputs = [ outputs = [ "$target_out_dir/grit_sources.script.stamp" ]
"$target_out_dir/grit_sources.script.stamp",
]
args = [ args = [
rebase_path("//tools/grit", root_build_dir), rebase_path("//tools/grit", root_build_dir),
...@@ -47,8 +43,6 @@ if (is_mac && is_asan) { ...@@ -47,8 +43,6 @@ if (is_mac && is_asan) {
bundle_root_dir = "$target_out_dir/$target_name" bundle_root_dir = "$target_out_dir/$target_name"
bundle_executable_dir = bundle_root_dir bundle_executable_dir = bundle_root_dir
public_deps = [ public_deps = [ "//third_party/brotli:brotli($host_toolchain)" ]
"//third_party/brotli:brotli($host_toolchain)",
]
} }
} }
...@@ -271,12 +271,8 @@ template("grit") { ...@@ -271,12 +271,8 @@ template("grit") {
script = "//tools/grit/grit.py" script = "//tools/grit/grit.py"
depfile = "$target_gen_dir/$target_name.d" depfile = "$target_gen_dir/$target_name.d"
inputs = [ inputs = [ invoker.source ]
invoker.source, deps = [ "//tools/grit:grit_sources" ]
]
deps = [
"//tools/grit:grit_sources",
]
outputs = [ "${depfile}.stamp" ] + _grit_outputs + _pak_info_outputs outputs = [ "${depfile}.stamp" ] + _grit_outputs + _pak_info_outputs
_grit_flags = grit_defines _grit_flags = grit_defines
...@@ -455,13 +451,9 @@ template("grit") { ...@@ -455,13 +451,9 @@ template("grit") {
# grit above rather than this library. This target needs to depend on the # grit above rather than this library. This target needs to depend on the
# action publicly so other scripts can take the outputs from the grit # action publicly so other scripts can take the outputs from the grit
# script as inputs. # script as inputs.
public_deps = [ public_deps = [ ":$_grit_custom_target" ]
":$_grit_custom_target",
]
deps = [ deps = [ "//base" ]
"//base",
]
if (defined(invoker.public_configs)) { if (defined(invoker.public_configs)) {
public_configs += invoker.public_configs public_configs += invoker.public_configs
......
...@@ -54,9 +54,7 @@ template("repack") { ...@@ -54,9 +54,7 @@ template("repack") {
script = "//tools/grit/pak_util.py" script = "//tools/grit/pak_util.py"
inputs = invoker.sources inputs = invoker.sources
outputs = [ outputs = [ invoker.output ]
invoker.output,
]
args = [ "repack" ] args = [ "repack" ]
if (defined(invoker.repack_whitelist)) { if (defined(invoker.repack_whitelist)) {
...@@ -80,20 +78,12 @@ template("repack") { ...@@ -80,20 +78,12 @@ template("repack") {
"visibility", "visibility",
]) ])
public_deps = [ public_deps = [ ":$_repack_target_name" ]
":$_repack_target_name", sources = [ invoker.output ]
]
sources = [
invoker.output,
]
if (defined(invoker.bundle_output)) { if (defined(invoker.bundle_output)) {
outputs = [ outputs = [ invoker.bundle_output ]
invoker.bundle_output,
]
} else { } else {
outputs = [ outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
"{{bundle_resources_dir}}/{{source_file_part}}",
]
} }
} }
} }
......
...@@ -22,9 +22,7 @@ executable("ipc_fuzzer") { ...@@ -22,9 +22,7 @@ executable("ipc_fuzzer") {
"//base/util/type_safety", "//base/util/type_safety",
"//tools/ipc_fuzzer/message_lib:ipc_message_lib", "//tools/ipc_fuzzer/message_lib:ipc_message_lib",
] ]
public_deps = [ public_deps = [ "//ipc" ]
"//ipc",
]
if (is_asan && is_chromeos) { if (is_asan && is_chromeos) {
# Compiling fuzzer.cc with ASan takes too long, see # Compiling fuzzer.cc with ASan takes too long, see
# http://crbug.com/360158. # http://crbug.com/360158.
......
executable("get_accessible_interfaces") { executable("get_accessible_interfaces") {
sources = [ sources = [ "get_accessible_interfaces.cc" ]
"get_accessible_interfaces.cc",
]
deps = [ deps = [
"//base", "//base",
......
...@@ -5,10 +5,6 @@ ...@@ -5,10 +5,6 @@
loadable_module("ipc_message_dump") { loadable_module("ipc_message_dump") {
testonly = true testonly = true
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_tool_config" ] configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_tool_config" ]
deps = [ deps = [ "//tools/ipc_fuzzer/message_lib:ipc_message_lib" ]
"//tools/ipc_fuzzer/message_lib:ipc_message_lib", sources = [ "message_dump.cc" ]
]
sources = [
"message_dump.cc",
]
} }
...@@ -9,9 +9,7 @@ executable("ipc_message_util") { ...@@ -9,9 +9,7 @@ executable("ipc_message_util") {
"//third_party/re2", "//third_party/re2",
"//tools/ipc_fuzzer/message_lib:ipc_message_lib", "//tools/ipc_fuzzer/message_lib:ipc_message_lib",
] ]
sources = [ sources = [ "message_util.cc" ]
"message_util.cc",
]
} }
executable("ipc_message_list") { executable("ipc_message_list") {
...@@ -22,7 +20,5 @@ executable("ipc_message_list") { ...@@ -22,7 +20,5 @@ executable("ipc_message_list") {
"//components/nacl/common:buildflags", "//components/nacl/common:buildflags",
"//tools/ipc_fuzzer/message_lib:ipc_message_lib", "//tools/ipc_fuzzer/message_lib:ipc_message_lib",
] ]
sources = [ sources = [ "message_list.cc" ]
"message_list.cc",
]
} }
...@@ -8,7 +8,5 @@ source_set("generated_api_util") { ...@@ -8,7 +8,5 @@ source_set("generated_api_util") {
"util.cc", "util.cc",
"util.h", "util.h",
] ]
deps = [ deps = [ "//base" ]
"//base",
]
} }
...@@ -36,9 +36,7 @@ generated_types("generated_types") { ...@@ -36,9 +36,7 @@ generated_types("generated_types") {
root_namespace = "test::api::%(namespace)s" root_namespace = "test::api::%(namespace)s"
deps = [ deps = [ "//extensions/buildflags" ]
"//extensions/buildflags",
]
} }
json_features("features_compiler_test") { json_features("features_compiler_test") {
...@@ -73,9 +71,7 @@ source_set("unit_tests") { ...@@ -73,9 +71,7 @@ source_set("unit_tests") {
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations. # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
public_deps = [ public_deps = [ ":features_compiler_test" ]
":features_compiler_test",
]
deps = [ deps = [
":generated_types", ":generated_types",
......
...@@ -53,7 +53,6 @@ generator_sources = [ ...@@ -53,7 +53,6 @@ generator_sources = [
copy("generator") { copy("generator") {
sources = generator_sources sources = generator_sources
outputs = [ outputs =
"$root_out_dir/{{source_root_relative_dir}}/{{source_file_part}}", [ "$root_out_dir/{{source_root_relative_dir}}/{{source_file_part}}" ]
]
} }
...@@ -9,9 +9,7 @@ action("gen_structured_events") { ...@@ -9,9 +9,7 @@ action("gen_structured_events") {
"//tools/metrics/structured/events_template.py", "//tools/metrics/structured/events_template.py",
"//tools/metrics/structured/gen_events.py", "//tools/metrics/structured/gen_events.py",
] ]
sources = [ sources = [ "//tools/metrics/structured/structured.xml" ]
"//tools/metrics/structured/structured.xml",
]
outdir = "$target_gen_dir" outdir = "$target_gen_dir"
......
...@@ -25,13 +25,9 @@ group("vr_perf_tests") { ...@@ -25,13 +25,9 @@ group("vr_perf_tests") {
"//chrome/test/data/xr/webvr_info/samples/", "//chrome/test/data/xr/webvr_info/samples/",
"//third_party/webxr_test_pages/webxr-samples/", "//third_party/webxr_test_pages/webxr-samples/",
] ]
data_deps = [ data_deps = [ "//testing:run_perf_test" ]
"//testing:run_perf_test",
]
deps = [ deps = [ "//tools/perf:perf" ]
"//tools/perf:perf",
]
if (is_android) { if (is_android) {
data += [ data += [
...@@ -71,9 +67,7 @@ action("generate_vr_assets_profile") { ...@@ -71,9 +67,7 @@ action("generate_vr_assets_profile") {
"//chrome/browser/resources/vr/assets/VERSION", "//chrome/browser/resources/vr/assets/VERSION",
"//chrome/browser/resources/vr/assets/vr_assets_component_files.json", "//chrome/browser/resources/vr/assets/vr_assets_component_files.json",
] ]
outputs = [ outputs = [ "$target_gen_dir/vr_assets_profile" ]
"$target_gen_dir/vr_assets_profile",
]
args = [ args = [
"--output", "--output",
rebase_path(target_gen_dir, root_build_dir), rebase_path(target_gen_dir, root_build_dir),
......
...@@ -12,7 +12,5 @@ shared_library("chromeexts") { ...@@ -12,7 +12,5 @@ shared_library("chromeexts") {
"commands/hwnd_command.h", "commands/hwnd_command.h",
] ]
deps = [ deps = [ "//base" ]
"//base",
]
} }
...@@ -98,9 +98,7 @@ component("url") { ...@@ -98,9 +98,7 @@ component("url") {
if (is_android) { if (is_android) {
static_library("origin_android") { static_library("origin_android") {
sources = [ sources = [ "android/origin_android.cc" ]
"android/origin_android.cc",
]
deps = [ deps = [
":url", ":url",
...@@ -111,18 +109,12 @@ if (is_android) { ...@@ -111,18 +109,12 @@ if (is_android) {
} }
android_library("url_java") { android_library("url_java") {
sources = [ sources = [ "android/java/src/org/chromium/url/IDNStringUtil.java" ]
"android/java/src/org/chromium/url/IDNStringUtil.java", deps = [ "//base:base_java" ]
]
deps = [
"//base:base_java",
]
} }
android_library("origin_java") { android_library("origin_java") {
sources = [ sources = [ "android/java/src/org/chromium/url/Origin.java" ]
"android/java/src/org/chromium/url/Origin.java",
]
deps = [ deps = [
"//base:base_java", "//base:base_java",
"//url/mojom:url_mojom_origin_java", "//url/mojom:url_mojom_origin_java",
...@@ -208,9 +200,7 @@ test("url_perftests") { ...@@ -208,9 +200,7 @@ test("url_perftests") {
} }
fuzzer_test("gurl_fuzzer") { fuzzer_test("gurl_fuzzer") {
sources = [ sources = [ "gurl_fuzzer.cc" ]
"gurl_fuzzer.cc",
]
deps = [ deps = [
":url", ":url",
"//base", "//base",
......
...@@ -17,17 +17,13 @@ component("url_ipc") { ...@@ -17,17 +17,13 @@ component("url_ipc") {
"//ipc", "//ipc",
"//url", "//url",
] ]
deps = [ deps = [ "//base" ]
"//base",
]
} }
# IPC unit tests aren't build on iOS. # IPC unit tests aren't build on iOS.
if (!is_ios) { if (!is_ios) {
test("url_ipc_unittests") { test("url_ipc_unittests") {
sources = [ sources = [ "url_param_traits_unittest.cc" ]
"url_param_traits_unittest.cc",
]
deps = [ deps = [
":url_ipc", ":url_ipc",
......
...@@ -6,16 +6,12 @@ import("//mojo/public/tools/bindings/mojom.gni") ...@@ -6,16 +6,12 @@ import("//mojo/public/tools/bindings/mojom.gni")
mojom("url_mojom_gurl") { mojom("url_mojom_gurl") {
generate_java = true generate_java = true
sources = [ sources = [ "url.mojom" ]
"url.mojom",
]
} }
mojom("url_mojom_origin") { mojom("url_mojom_origin") {
generate_java = true generate_java = true
sources = [ sources = [ "origin.mojom" ]
"origin.mojom",
]
public_deps = [ public_deps = [
":url_mojom_gurl", ":url_mojom_gurl",
...@@ -26,9 +22,7 @@ mojom("url_mojom_origin") { ...@@ -26,9 +22,7 @@ mojom("url_mojom_origin") {
} }
mojom("test_url_mojom_gurl") { mojom("test_url_mojom_gurl") {
sources = [ sources = [ "url_test.mojom" ]
"url_test.mojom",
]
public_deps = [ public_deps = [
":url_mojom_gurl", ":url_mojom_gurl",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment